1455 obj_to_push = cur;
1456 }
1457 bool ok = work_q->push(obj_to_push);
1458 assert(ok, "Should have succeeded");
1459 cur = next;
1460 n++;
1461 }
1462 TASKQUEUE_STATS_ONLY(par_scan_state->note_overflow_refill(n));
1463 #ifndef PRODUCT
1464 assert(_num_par_pushes >= n, "Too many pops?");
1465 Atomic::sub(n, &_num_par_pushes);
1466 #endif
1467 return true;
1468 }
1469 #undef BUSY
1470
1471 void ParNewGeneration::ref_processor_init() {
1472 if (_ref_processor == NULL) {
1473 // Allocate and initialize a reference processor
1474 _ref_processor =
1475 new ReferenceProcessor(_reserved, // span
1476 ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing
1477 ParallelGCThreads, // mt processing degree
1478 refs_discovery_is_mt(), // mt discovery
1479 ParallelGCThreads, // mt discovery degree
1480 refs_discovery_is_atomic(), // atomic_discovery
1481 NULL); // is_alive_non_header
1482 }
1483 }
1484
1485 const char* ParNewGeneration::name() const {
1486 return "par new generation";
1487 }
1488
1489 void ParNewGeneration::restore_preserved_marks() {
1490 SharedRestorePreservedMarksTaskExecutor task_executor(CMSHeap::heap()->workers());
1491 _preserved_marks_set.restore(&task_executor);
1492 }
|
1455 obj_to_push = cur;
1456 }
1457 bool ok = work_q->push(obj_to_push);
1458 assert(ok, "Should have succeeded");
1459 cur = next;
1460 n++;
1461 }
1462 TASKQUEUE_STATS_ONLY(par_scan_state->note_overflow_refill(n));
1463 #ifndef PRODUCT
1464 assert(_num_par_pushes >= n, "Too many pops?");
1465 Atomic::sub(n, &_num_par_pushes);
1466 #endif
1467 return true;
1468 }
1469 #undef BUSY
1470
1471 void ParNewGeneration::ref_processor_init() {
1472 if (_ref_processor == NULL) {
1473 // Allocate and initialize a reference processor
1474 _ref_processor =
1475 new SpanReferenceProcessor(_reserved, // span
1476 ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing
1477 ParallelGCThreads, // mt processing degree
1478 refs_discovery_is_mt(), // mt discovery
1479 ParallelGCThreads, // mt discovery degree
1480 refs_discovery_is_atomic(), // atomic_discovery
1481 NULL); // is_alive_non_header
1482 }
1483 }
1484
1485 const char* ParNewGeneration::name() const {
1486 return "par new generation";
1487 }
1488
1489 void ParNewGeneration::restore_preserved_marks() {
1490 SharedRestorePreservedMarksTaskExecutor task_executor(CMSHeap::heap()->workers());
1491 _preserved_marks_set.restore(&task_executor);
1492 }
|