RFR (M): 8006952: Slow VM due to excessive code cache freelist iteration

Nils Eliasson nils.eliasson at oracle.com
Tue Jan 29 02:56:31 PST 2013


Remove continuous free block requirement for code cache flushing and 
minimum free space.

This causes a degenerate behavior when the VM are repeatedly flushing 
the code cache trying to free up a continuous 1,5M block. Since the 
freelist is fragmented a significant part of the code cache is kept 
unallocated. A significant amount of time is spent traversing the 
freelist holding the code cache lock or waiting for other threads doing 
the same.

I don't see any reason for why a continuous block is required. Code 
cache flushing threshold (CodeCacheFlushingMinimumFreeSpace) is default 
1,5M and code cache minimum threshold (CodeCacheMinimumFreeSpace) is 
0,5M. Finding such a block on the freelist is often unrealistic, and has 
not any purpose. The largest nmethods are in the order of 250k, and they 
are not allocated when code cache is starting to run out. All critical 
adapters are small and will fit easily in the freelist or in the 
remaining heap space.

http://cr.openjdk.java.net/~neliasso/8006952/webrev.02/

Thanks,
Nils Eliasson


More information about the hotspot-compiler-dev mailing list