src/share/vm/code/codeCache.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot-comp.tty-lock Sdiff src/share/vm/code

src/share/vm/code/codeCache.cpp

Print this page




 954                " adapters=" UINT32_FORMAT " free_code_cache=" SIZE_FORMAT "Kb"
 955                " largest_free_block=" SIZE_FORMAT,
 956                nof_blobs(), nof_nmethods(), nof_adapters(),
 957                unallocated_capacity()/K, largest_free_block());
 958 }
 959 
 960 void CodeCache::log_state(outputStream* st) {
 961   st->print(" total_blobs='" UINT32_FORMAT "' nmethods='" UINT32_FORMAT "'"
 962             " adapters='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'"
 963             " largest_free_block='" SIZE_FORMAT "'",
 964             nof_blobs(), nof_nmethods(), nof_adapters(),
 965             unallocated_capacity(), largest_free_block());
 966 }
 967 
 968 size_t CodeCache::largest_free_block() {
 969   // This is called both with and without CodeCache_lock held so
 970   // handle both cases.
 971   if (CodeCache_lock->owned_by_self()) {
 972     return _heap->largest_free_block();
 973   } else {
 974     // Avoid lock ordering problems with ttyLock.
 975     ttyUnlocker ttyul;
 976     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
 977     return _heap->largest_free_block();
 978   }
 979 }


 954                " adapters=" UINT32_FORMAT " free_code_cache=" SIZE_FORMAT "Kb"
 955                " largest_free_block=" SIZE_FORMAT,
 956                nof_blobs(), nof_nmethods(), nof_adapters(),
 957                unallocated_capacity()/K, largest_free_block());
 958 }
 959 
 960 void CodeCache::log_state(outputStream* st) {
 961   st->print(" total_blobs='" UINT32_FORMAT "' nmethods='" UINT32_FORMAT "'"
 962             " adapters='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'"
 963             " largest_free_block='" SIZE_FORMAT "'",
 964             nof_blobs(), nof_nmethods(), nof_adapters(),
 965             unallocated_capacity(), largest_free_block());
 966 }
 967 
 968 size_t CodeCache::largest_free_block() {
 969   // This is called both with and without CodeCache_lock held so
 970   // handle both cases.
 971   if (CodeCache_lock->owned_by_self()) {
 972     return _heap->largest_free_block();
 973   } else {


 974     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
 975     return _heap->largest_free_block();
 976   }
 977 }
src/share/vm/code/codeCache.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File