equal
deleted
inserted
replaced
96 |
96 |
97 public: |
97 public: |
98 G1ConcPhaseTimer(G1ConcurrentMark* cm, const char* title) : |
98 G1ConcPhaseTimer(G1ConcurrentMark* cm, const char* title) : |
99 GCTraceConcTimeImpl<LogLevel::Info, LogTag::_gc, LogTag::_marking>(title), |
99 GCTraceConcTimeImpl<LogLevel::Info, LogTag::_gc, LogTag::_marking>(title), |
100 _cm(cm) { |
100 _cm(cm) { |
101 _cm->register_concurrent_phase_start(title); |
101 _cm->gc_timer_cm()->register_gc_concurrent_start(title); |
102 } |
102 } |
103 |
103 |
104 ~G1ConcPhaseTimer() { |
104 ~G1ConcPhaseTimer() { |
105 _cm->register_concurrent_phase_end(); |
105 _cm->gc_timer_cm()->register_gc_concurrent_end(); |
106 } |
106 } |
107 }; |
107 }; |
108 |
108 |
109 void ConcurrentMarkThread::run_service() { |
109 void ConcurrentMarkThread::run_service() { |
110 _vtime_start = os::elapsedVTime(); |
110 _vtime_start = os::elapsedVTime(); |
116 // wait until started is set. |
116 // wait until started is set. |
117 sleepBeforeNextCycle(); |
117 sleepBeforeNextCycle(); |
118 if (should_terminate()) { |
118 if (should_terminate()) { |
119 break; |
119 break; |
120 } |
120 } |
|
121 |
|
122 GCIdMark gc_id_mark; |
|
123 |
|
124 cm()->concurrent_cycle_start(); |
121 |
125 |
122 assert(GCId::current() != GCId::undefined(), "GC id should have been set up by the initial mark GC."); |
126 assert(GCId::current() != GCId::undefined(), "GC id should have been set up by the initial mark GC."); |
123 |
127 |
124 GCTraceConcTime(Info, gc) tt("Concurrent Cycle"); |
128 GCTraceConcTime(Info, gc) tt("Concurrent Cycle"); |
125 { |
129 { |
277 // Java thread is waiting for a full GC to happen (e.g., it |
281 // Java thread is waiting for a full GC to happen (e.g., it |
278 // called System.gc() with +ExplicitGCInvokesConcurrent). |
282 // called System.gc() with +ExplicitGCInvokesConcurrent). |
279 { |
283 { |
280 SuspendibleThreadSetJoiner sts_join; |
284 SuspendibleThreadSetJoiner sts_join; |
281 g1h->increment_old_marking_cycles_completed(true /* concurrent */); |
285 g1h->increment_old_marking_cycles_completed(true /* concurrent */); |
282 g1h->register_concurrent_cycle_end(); |
286 |
|
287 cm()->concurrent_cycle_end(); |
283 } |
288 } |
284 } |
289 } |
285 _cm->root_regions()->cancel_scan(); |
290 _cm->root_regions()->cancel_scan(); |
286 } |
291 } |
287 |
292 |