--- old/src/share/vm/services/runtimeService.cpp 2015-11-19 15:35:30.798128442 +0100 +++ new/src/share/vm/services/runtimeService.cpp 2015-11-19 15:35:30.686128446 +0100 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "classfile/classLoader.hpp" +#include "logging/log.hpp" #include "runtime/vm_version.hpp" #include "services/attachListener.hpp" #include "services/management.hpp" @@ -89,11 +90,8 @@ HS_PRIVATE_SAFEPOINT_BEGIN(); // Print the time interval in which the app was executing - if (PrintGCApplicationConcurrentTime && _app_timer.is_updated()) { - gclog_or_tty->date_stamp(PrintGCDateStamps); - gclog_or_tty->stamp(PrintGCTimeStamps); - gclog_or_tty->print_cr("Application time: %3.7f seconds", - last_application_time_sec()); + if (_app_timer.is_updated()) { + log_info(safepoint)("Application time: %3.7f seconds", last_application_time_sec()); } // update the time stamp to begin recording safepoint time @@ -111,7 +109,7 @@ if (UsePerfData) { _sync_time_ticks->inc(_safepoint_timer.ticks_since_update()); } - if (PrintGCApplicationStoppedTime) { + if (log_is_enabled(Info, safepoint)) { _last_safepoint_sync_time_sec = last_safepoint_time_sec(); } } @@ -121,15 +119,9 @@ // Print the time interval for which the app was stopped // during the current safepoint operation. - if (PrintGCApplicationStoppedTime) { - gclog_or_tty->date_stamp(PrintGCDateStamps); - gclog_or_tty->stamp(PrintGCTimeStamps); - gclog_or_tty->print_cr("Total time for which application threads " - "were stopped: %3.7f seconds, " - "Stopping threads took: %3.7f seconds", + log_info(safepoint)("Total time for which application threads were stopped: %3.7f seconds, Stopping threads took: %3.7f seconds", last_safepoint_time_sec(), _last_safepoint_sync_time_sec); - } // update the time stamp to begin recording app time _app_timer.update();