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