JDK-7025742 : Can not use CodeCache::unallocated_capacity() with fragmented CodeCache
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs21
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-03-08
  • Updated: 2013-01-30
  • Resolved: 2011-04-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 Other
7Fixed hs21Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
In the bug report 7009641 there was no space left in CodeCache to create vtable_stub but unallocated_capacity() reports that it still has 600Kb of free space. But free space is very fragmented and the largest free block is only 384 bytes.

Code Cache  [0xf35ff000, 0xf75ff000, 0xf75ff000)
 total_blobs=31835 nmethods=31389 adapters=372 free_code_cache=629120 largest_free_block=384

http://vmsqe.russia.sun.com/execution/results/JDK7/PROMOTION/VM/PERMGEN/7/b129_permgen/2011-02-17/SerialGC/bigapps/linux-i586/client/comp/linux-i586_bigapps__client_comp_runThese/runThese/

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/1c0cf339481b
21-03-2011

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/1c0cf339481b
09-03-2011

EVALUATION Use largest_free_block() instead of unallocated_capacity() so we stop compiling when continues free space left is less then CodeCacheMinimumFreeSpace =500Kb: OpenJDK Server VM warning: CodeCache is full. Compiler has been disabled. OpenJDK Server VM warning: Try increasing the code cache size using -XX:ReservedCodeCacheSize= Code Cache [0xfce00000, 0xfd188000, 0xfd200000) total_blobs=1914 nmethods=1804 adapters=69 free_code_cache=544Kb largest_free_block=509120
08-03-2011