src/share/vm/code/codeCache.cpp

changeset 5151
91eba9f82325
parent 5038
0cfa93c2fcc4
child 5237
f2110083203d
equal deleted inserted replaced
5130:7ec426e29e4c 5151:91eba9f82325
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");

mercurial