--- old/src/hotspot/share/runtime/sweeper.cpp 2018-03-01 18:10:00.009626000 +0100 +++ new/src/hotspot/share/runtime/sweeper.cpp 2018-03-01 18:09:59.761621000 +0100 @@ -821,12 +821,12 @@ } } -void NMethodSweeper::print() { +void NMethodSweeper::print(outputStream *st) { ttyLocker ttyl; - tty->print_cr("Code cache sweeper statistics:"); - tty->print_cr(" Total sweep time: %1.0lfms", (double)_total_time_sweeping.value()/1000000); - tty->print_cr(" Total number of full sweeps: %ld", _total_nof_code_cache_sweeps); - tty->print_cr(" Total number of flushed methods: %ld(%ld C2 methods)", _total_nof_methods_reclaimed, - _total_nof_c2_methods_reclaimed); - tty->print_cr(" Total size of flushed methods: " SIZE_FORMAT "kB", _total_flushed_size/K); + st->print_cr("Code cache sweeper statistics:"); + st->print_cr(" Total sweep time: %1.0lfms", (double)_total_time_sweeping.value()/1000000); + st->print_cr(" Total number of full sweeps: %ld", _total_nof_code_cache_sweeps); + st->print_cr(" Total number of flushed methods: %ld(%ld C2 methods)", _total_nof_methods_reclaimed, + _total_nof_c2_methods_reclaimed); + st->print_cr(" Total size of flushed methods: " SIZE_FORMAT "kB", _total_flushed_size/K); }