8012371: Adjust Tiered compile threshold according to available space in code cache

Added command line parameter to define a threshold at which C1 compilation threshold for  is increased.

Reviewed-by: kvn, iveresov
This commit is contained in:
Albert Noll 2013-05-16 15:46:49 +02:00
parent dbe27b6d39
commit 114b578228
6 changed files with 39 additions and 1 deletions

View file

@ -622,6 +622,15 @@ address CodeCache::last_address() {
return (address)_heap->high();
}
/**
* Returns the reverse free ratio. E.g., if 25% (1/4) of the code cache
* is free, reverse_free_ratio() returns 4.
*/
double CodeCache::reverse_free_ratio() {
double unallocated_capacity = (double)(CodeCache::unallocated_capacity() - CodeCacheMinimumFreeSpace);
double max_capacity = (double)CodeCache::max_capacity();
return max_capacity / unallocated_capacity;
}
void icache_init();