mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
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:
parent
dbe27b6d39
commit
114b578228
6 changed files with 39 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue