2254 uint active_workers = g1h->workers()->active_workers();
2255 set_concurrency_and_phase(active_workers, false /* concurrent */);
2256 // Leave _parallel_marking_threads at it's
2257 // value originally calculated in the G1ConcurrentMark
2258 // constructor and pass values of the active workers
2259 // through the gang in the task.
2260
2261 {
2262 StrongRootsScope srs(active_workers);
2263
2264 G1CMRemarkTask remarkTask(this, active_workers);
2265 // We will start all available threads, even if we decide that the
2266 // active_workers will be fewer. The extra ones will just bail out
2267 // immediately.
2268 g1h->workers()->run_task(&remarkTask);
2269 }
2270
2271 SATBMarkQueueSet& satb_mq_set = JavaThread::satb_mark_queue_set();
2272 guarantee(has_overflown() ||
2273 satb_mq_set.completed_buffers_num() == 0,
2274 "Invariant: has_overflown = %s, num buffers = %d",
2275 BOOL_TO_STR(has_overflown()),
2276 satb_mq_set.completed_buffers_num());
2277
2278 print_stats();
2279 }
2280
2281 void G1ConcurrentMark::clearRangePrevBitmap(MemRegion mr) {
2282 // Note we are overriding the read-only view of the prev map here, via
2283 // the cast.
2284 ((G1CMBitMap*)_prevMarkBitMap)->clearRange(mr);
2285 }
2286
2287 HeapRegion*
2288 G1ConcurrentMark::claim_region(uint worker_id) {
2289 // "checkpoint" the finger
2290 HeapWord* finger = _finger;
2291
2292 // _heap_end will not change underneath our feet; it only changes at
2293 // yield points.
2294 while (finger < _heap_end) {
|
2254 uint active_workers = g1h->workers()->active_workers();
2255 set_concurrency_and_phase(active_workers, false /* concurrent */);
2256 // Leave _parallel_marking_threads at it's
2257 // value originally calculated in the G1ConcurrentMark
2258 // constructor and pass values of the active workers
2259 // through the gang in the task.
2260
2261 {
2262 StrongRootsScope srs(active_workers);
2263
2264 G1CMRemarkTask remarkTask(this, active_workers);
2265 // We will start all available threads, even if we decide that the
2266 // active_workers will be fewer. The extra ones will just bail out
2267 // immediately.
2268 g1h->workers()->run_task(&remarkTask);
2269 }
2270
2271 SATBMarkQueueSet& satb_mq_set = JavaThread::satb_mark_queue_set();
2272 guarantee(has_overflown() ||
2273 satb_mq_set.completed_buffers_num() == 0,
2274 "Invariant: has_overflown = %s, num buffers = " SIZE_FORMAT,
2275 BOOL_TO_STR(has_overflown()),
2276 satb_mq_set.completed_buffers_num());
2277
2278 print_stats();
2279 }
2280
2281 void G1ConcurrentMark::clearRangePrevBitmap(MemRegion mr) {
2282 // Note we are overriding the read-only view of the prev map here, via
2283 // the cast.
2284 ((G1CMBitMap*)_prevMarkBitMap)->clearRange(mr);
2285 }
2286
2287 HeapRegion*
2288 G1ConcurrentMark::claim_region(uint worker_id) {
2289 // "checkpoint" the finger
2290 HeapWord* finger = _finger;
2291
2292 // _heap_end will not change underneath our feet; it only changes at
2293 // yield points.
2294 while (finger < _heap_end) {
|