--- a/hotspot/src/share/vm/gc/g1/g1GCPhaseTimes.cpp Sun Nov 29 10:00:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1GCPhaseTimes.cpp Sun Nov 29 10:00:31 2015 +0100
@@ -141,6 +141,7 @@
assert(active_gc_threads <= _max_gc_threads, "The number of active threads must be <= the max number of threads");
_active_gc_threads = active_gc_threads;
_cur_expand_heap_time_ms = 0.0;
+ _external_accounted_time_ms = 0.0;
for (int i = 0; i < GCParPhasesSentinel; i++) {
_gc_par_phases[i]->reset();
@@ -185,9 +186,12 @@
}
double G1GCPhaseTimes::accounted_time_ms() {
+ // First subtract any externally accounted time
+ double misc_time_ms = _external_accounted_time_ms;
+
// Subtract the root region scanning wait time. It's initialized to
// zero at the start of the pause.
- double misc_time_ms = _root_region_scan_wait_time_ms;
+ misc_time_ms += _root_region_scan_wait_time_ms;
misc_time_ms += _cur_collection_par_time_ms;