--- old/src/share/vm/gc/shared/generation.cpp 2017-09-01 13:03:03.342353399 +0200 +++ new/src/share/vm/gc/shared/generation.cpp 2017-09-01 13:03:03.206347994 +0200 @@ -94,23 +94,15 @@ p2i(_virtual_space.high_boundary())); } -void Generation::print_summary_info() { print_summary_info_on(tty); } - -void Generation::print_summary_info_on(outputStream* st) { +void Generation::print_summary_info() { StatRecord* sr = stat_record(); double time = sr->accumulated_time.seconds(); - // I didn't want to change the logging when removing the level concept, - // but I guess this logging could say young/old or something instead of 0/1. - uint level; - if (GenCollectedHeap::heap()->is_young_gen(this)) { - level = 0; - } else { - level = 1; - } - st->print_cr("[Accumulated GC generation %d time %3.7f secs, " - "%u GC's, avg GC time %3.7f]", - level, time, sr->invocations, - sr->invocations > 0 ? time / sr->invocations : 0.0); + log_debug(gc, heap, exit)("Accumulated %s generation GC time %3.7f secs, " + "%u GC's, avg GC time %3.7f", + GenCollectedHeap::heap()->is_young_gen(this) ? "young" : "old" , + time, + sr->invocations, + sr->invocations > 0 ? time / sr->invocations : 0.0); } // Utility iterator classes