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

src/share/vm/code/codeCache.cpp

Print this page
rev 6793 : 8054889: Compiler team's implementation task
Summary: Adding three new diagnostic commands for compiler
Reviewed-by:


 950   st->print_cr("CodeCache: size=" SIZE_FORMAT "Kb used=" SIZE_FORMAT
 951                "Kb max_used=" SIZE_FORMAT "Kb free=" SIZE_FORMAT "Kb",
 952                total/K, (total - unallocated_capacity())/K,
 953                maxCodeCacheUsed/K, unallocated_capacity()/K);
 954 
 955   if (detailed) {
 956     st->print_cr(" bounds [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT "]",
 957                  p2i(_heap->low_boundary()),
 958                  p2i(_heap->high()),
 959                  p2i(_heap->high_boundary()));
 960     st->print_cr(" total_blobs=" UINT32_FORMAT " nmethods=" UINT32_FORMAT
 961                  " adapters=" UINT32_FORMAT,
 962                  nof_blobs(), nof_nmethods(), nof_adapters());
 963     st->print_cr(" compilation: %s", CompileBroker::should_compile_new_jobs() ?
 964                  "enabled" : Arguments::mode() == Arguments::_int ?
 965                  "disabled (interpreter mode)" :
 966                  "disabled (not enough contiguous free space left)");
 967   }
 968 }
 969 



















 970 void CodeCache::log_state(outputStream* st) {
 971   st->print(" total_blobs='" UINT32_FORMAT "' nmethods='" UINT32_FORMAT "'"
 972             " adapters='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'",
 973             nof_blobs(), nof_nmethods(), nof_adapters(),
 974             unallocated_capacity());
 975 }
 976 


 950   st->print_cr("CodeCache: size=" SIZE_FORMAT "Kb used=" SIZE_FORMAT
 951                "Kb max_used=" SIZE_FORMAT "Kb free=" SIZE_FORMAT "Kb",
 952                total/K, (total - unallocated_capacity())/K,
 953                maxCodeCacheUsed/K, unallocated_capacity()/K);
 954 
 955   if (detailed) {
 956     st->print_cr(" bounds [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT "]",
 957                  p2i(_heap->low_boundary()),
 958                  p2i(_heap->high()),
 959                  p2i(_heap->high_boundary()));
 960     st->print_cr(" total_blobs=" UINT32_FORMAT " nmethods=" UINT32_FORMAT
 961                  " adapters=" UINT32_FORMAT,
 962                  nof_blobs(), nof_nmethods(), nof_adapters());
 963     st->print_cr(" compilation: %s", CompileBroker::should_compile_new_jobs() ?
 964                  "enabled" : Arguments::mode() == Arguments::_int ?
 965                  "disabled (interpreter mode)" :
 966                  "disabled (not enough contiguous free space left)");
 967   }
 968 }
 969 
 970 void CodeCache::print_codelist(outputStream* st) {
 971   assert_locked_or_safepoint(CodeCache_lock);
 972 
 973   FOR_ALL_ALIVE_NMETHODS(p) {
 974     ResourceMark rm;
 975     char *method_name = p->method()->name_and_sig_as_C_string();
 976     st->print_cr("%d %d %s ["INTPTR_FORMAT", "INTPTR_FORMAT" - "INTPTR_FORMAT"]",
 977           p->compile_id(), p->comp_level(), method_name, (intptr_t)p->header_begin(),
 978           (intptr_t)p->code_begin(), (intptr_t)p->code_end());
 979   }
 980 }
 981 
 982 void CodeCache::print_layout(outputStream* st) {
 983   assert_locked_or_safepoint(CodeCache_lock);
 984   ResourceMark rm;
 985 
 986   print_summary(st, true);
 987 }
 988 
 989 void CodeCache::log_state(outputStream* st) {
 990   st->print(" total_blobs='" UINT32_FORMAT "' nmethods='" UINT32_FORMAT "'"
 991             " adapters='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'",
 992             nof_blobs(), nof_nmethods(), nof_adapters(),
 993             unallocated_capacity());
 994 }
 995 
src/share/vm/code/codeCache.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File