United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7025742 Can not use CodeCache::unallocated_capacity() with fragmented CodeCache
JDK-7025742 : Can not use CodeCache::unallocated_capacity() with fragmented CodeCache

Details
Type:
Bug
Submit Date:
2011-03-08
Status:
Closed
Updated Date:
2013-01-30
Project Name:
JDK
Resolved Date:
2011-04-24
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs21
Fixed Versions:
hs21 (b05)

Related Reports
Backport:
Relates:
Relates:
Relates:

Sub Tasks

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

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
                                     
2011-03-08
EVALUATION

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

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



Hardware and Software, Engineered to Work Together