[9] RFR(L): 8046809: vm/mlvm/meth/stress/compiler/deoptimize CodeCache is full.

Nils Eliasson nils.eliasson at oracle.com
Fri Oct 10 09:01:53 UTC 2014

Hi, Albert

Overall a very welcome change to move the sweeper into a separate thread.

On 2014-10-09 10:24, Albert Noll wrote:
> The patch also removes CodeCacheMinimumFreeSpace and 'critical' code 
> cache allocations. Due to a bug in
> heap.cpp, the CodeCacheMinimumFreeSpace was in fact not reserved for 
> 'critical' allocations. The following
> lines produce an underflow if heap_unallocated_capacity() < 
> CodeCacheMinimumFreeSpace:
> segments_to_size(number_of_segments) > (heap_unallocated_capacity() - 
> CodeCacheMinimumFreeSpace)
> Since the critical part in the code cache was never used for its 
> intended purpose and we did not have problems
> due to that, we can remove it.

Are you sure? The reasons for the CodeCacheMinimumFreeSpace and critical 
allocations where problems with code cache fragmentation in long running 
applications, where small compilations would starve out the adaptors and 
cause VM shutdown. You won't see this other than in the really long 
running tests. It might be broken - but then we should open a bug and 
fix it.  (And in the long run we should handle the fragmentation with 
relocating code.)


More information about the hotspot-compiler-dev mailing list