--- a/src/hotspot/share/runtime/sweeper.cpp Mon Mar 26 08:17:56 2018 -0400
+++ b/src/hotspot/share/runtime/sweeper.cpp Mon Mar 26 12:59:45 2018 -0700
@@ -824,12 +824,13 @@
}
}
-void NMethodSweeper::print() {
+void NMethodSweeper::print(outputStream* out) {
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,
+ out = (out == NULL) ? tty : out;
+ out->print_cr("Code cache sweeper statistics:");
+ out->print_cr(" Total sweep time: %1.0lf ms", (double)_total_time_sweeping.value()/1000000);
+ out->print_cr(" Total number of full sweeps: %ld", _total_nof_code_cache_sweeps);
+ out->print_cr(" Total number of flushed methods: %ld (thereof %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);
+ out->print_cr(" Total size of flushed methods: " SIZE_FORMAT " kB", _total_flushed_size/K);
}