# HG changeset patch # User dbuck # Date 1415270461 0 # Node ID 0d754e6851d3dd53b7c2f1db9c46edc8dbcb0b0a # Parent ef6b27d844cc0fa6724ca658cf0f70a6bf932e20# Parent 6f06ebb090805c6eb961ada13d05ccd67c34f78b Merge diff -r ef6b27d844cc -r 0d754e6851d3 src/share/vm/services/runtimeService.cpp --- a/src/share/vm/services/runtimeService.cpp Thu Nov 06 02:34:01 2014 -0800 +++ b/src/share/vm/services/runtimeService.cpp Thu Nov 06 10:41:01 2014 +0000 @@ -46,6 +46,7 @@ PerfCounter* RuntimeService::_thread_interrupt_signaled_count = NULL; PerfCounter* RuntimeService::_interrupted_before_count = NULL; PerfCounter* RuntimeService::_interrupted_during_count = NULL; +double RuntimeService::_last_safepoint_sync_time_sec = 0.0; void RuntimeService::init() { // Make sure the VM version is initialized @@ -128,6 +129,7 @@ // update the time stamp to begin recording safepoint time _safepoint_timer.update(); + _last_safepoint_sync_time_sec = 0.0; if (UsePerfData) { _total_safepoints->inc(); if (_app_timer.is_updated()) { @@ -140,6 +142,9 @@ if (UsePerfData) { _sync_time_ticks->inc(_safepoint_timer.ticks_since_update()); } + if (PrintGCApplicationStoppedTime) { + _last_safepoint_sync_time_sec = last_safepoint_time_sec(); + } } void RuntimeService::record_safepoint_end() { @@ -155,8 +160,10 @@ 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", - last_safepoint_time_sec()); + "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 diff -r ef6b27d844cc -r 0d754e6851d3 src/share/vm/services/runtimeService.hpp --- a/src/share/vm/services/runtimeService.hpp Thu Nov 06 02:34:01 2014 -0800 +++ b/src/share/vm/services/runtimeService.hpp Thu Nov 06 10:41:01 2014 +0000 @@ -40,6 +40,7 @@ static TimeStamp _safepoint_timer; static TimeStamp _app_timer; + static double _last_safepoint_sync_time_sec; public: static void init();