< prev index next >
src/share/vm/runtime/sweeper.cpp
Print this page
*** 401,410 ****
--- 401,412 ----
void NMethodSweeper::sweep_code_cache() {
ResourceMark rm;
Ticks sweep_start_counter = Ticks::now();
+ log_debug(codecache, sweep, start)("CodeCache flushing");
+
int flushed_count = 0;
int zombified_count = 0;
int flushed_c2_count = 0;
if (PrintMethodFlushing && Verbose) {
*** 498,507 ****
--- 500,513 ----
if(PrintMethodFlushing) {
tty->print_cr("### sweeper: sweep time(" JLONG_FORMAT "): ", sweep_time.value());
}
#endif
+ Log(codecache, sweep) log;
+ if (log.is_debug()) {
+ CodeCache::print_summary(log.debug_stream(), false);
+ }
log_sweep("finished");
// Sweeper is the only case where memory is released, check here if it
// is time to restart the compiler. Only checking if there is a certain
// amount of free memory in the code cache might lead to re-enabling
*** 511,520 ****
--- 517,527 ----
// it only makes sense to re-enable compilation if we have actually freed memory.
// Note that typically several kB are released for sweeping 16MB of the code
// cache. As a result, 'freed_memory' > 0 to restart the compiler.
if (!CompileBroker::should_compile_new_jobs() && (freed_memory > 0)) {
CompileBroker::set_should_compile_new_jobs(CompileBroker::run_compilation);
+ log.debug("restart compiler");
log_sweep("restart_compiler");
}
}
/**
< prev index next >