620 address CodeCache::last_address() { |
620 address CodeCache::last_address() { |
621 assert_locked_or_safepoint(CodeCache_lock); |
621 assert_locked_or_safepoint(CodeCache_lock); |
622 return (address)_heap->high(); |
622 return (address)_heap->high(); |
623 } |
623 } |
624 |
624 |
|
625 /** |
|
626 * Returns the reverse free ratio. E.g., if 25% (1/4) of the code cache |
|
627 * is free, reverse_free_ratio() returns 4. |
|
628 */ |
|
629 double CodeCache::reverse_free_ratio() { |
|
630 double unallocated_capacity = (double)(CodeCache::unallocated_capacity() - CodeCacheMinimumFreeSpace); |
|
631 double max_capacity = (double)CodeCache::max_capacity(); |
|
632 return max_capacity / unallocated_capacity; |
|
633 } |
625 |
634 |
626 void icache_init(); |
635 void icache_init(); |
627 |
636 |
628 void CodeCache::initialize() { |
637 void CodeCache::initialize() { |
629 assert(CodeCacheSegmentSize >= (uintx)CodeEntryAlignment, "CodeCacheSegmentSize must be large enough to align entry points"); |
638 assert(CodeCacheSegmentSize >= (uintx)CodeEntryAlignment, "CodeCacheSegmentSize must be large enough to align entry points"); |