--- old/src/share/vm/gc/g1/concurrentMark.hpp 2015-12-14 21:50:29.194701599 -0800 +++ new/src/share/vm/gc/g1/concurrentMark.hpp 2015-12-14 21:50:29.102701602 -0800 @@ -353,6 +353,11 @@ // time of remark. volatile bool _concurrent_marking_in_progress; + // True only inside of markFromRoots(). + // Similar to _concurrent_marking_in_progress but this is set to false + // when CMConcurrentMarkingTask is finished. + volatile bool _concurrent_marking_from_roots; + // All of these times are in ms NumberSeq _init_times; NumberSeq _remark_times; @@ -459,6 +464,12 @@ void enter_first_sync_barrier(uint worker_id); void enter_second_sync_barrier(uint worker_id); + // Start measuring concurrent mark from ConcurrentMark::markFromRoots(). + void register_mark_from_roots_phase_start(); + + // End measuring concurrent mark from ConcurrentMark::markFromRoots(). + void register_mark_from_roots_phase_end(); + // Live Data Counting data structures... // These data structures are initialized at the start of // marking. They are written to while marking is active. @@ -516,6 +527,10 @@ _concurrent_marking_in_progress = false; } + bool concurrent_marking_from_roots() const { + return _concurrent_marking_from_roots; + } + void update_accum_task_vtime(int i, double vtime) { _accum_task_vtime[i] += vtime; }