src/share/vm/gc_implementation/parNew/parNewGeneration.cpp

Print this page




1513       obj_to_push = cur;
1514     }
1515     bool ok = work_q->push(obj_to_push);
1516     assert(ok, "Should have succeeded");
1517     cur = next;
1518     n++;
1519   }
1520   TASKQUEUE_STATS_ONLY(par_scan_state->note_overflow_refill(n));
1521 #ifndef PRODUCT
1522   assert(_num_par_pushes >= n, "Too many pops?");
1523   Atomic::add_ptr(-(intptr_t)n, &_num_par_pushes);
1524 #endif
1525   return true;
1526 }
1527 #undef BUSY
1528 
1529 void ParNewGeneration::ref_processor_init()
1530 {
1531   if (_ref_processor == NULL) {
1532     // Allocate and initialize a reference processor
1533     _ref_processor = ReferenceProcessor::create_ref_processor(
1534         _reserved,                  // span




1535         refs_discovery_is_atomic(), // atomic_discovery
1536         refs_discovery_is_mt(),     // mt_discovery
1537         NULL,                       // is_alive_non_header
1538         ParallelGCThreads,
1539         ParallelRefProcEnabled);
1540   }
1541 }
1542 
1543 const char* ParNewGeneration::name() const {
1544   return "par new generation";
1545 }
1546 
1547 bool ParNewGeneration::in_use() {
1548   return UseParNewGC && ParallelGCThreads > 0;
1549 }


1513       obj_to_push = cur;
1514     }
1515     bool ok = work_q->push(obj_to_push);
1516     assert(ok, "Should have succeeded");
1517     cur = next;
1518     n++;
1519   }
1520   TASKQUEUE_STATS_ONLY(par_scan_state->note_overflow_refill(n));
1521 #ifndef PRODUCT
1522   assert(_num_par_pushes >= n, "Too many pops?");
1523   Atomic::add_ptr(-(intptr_t)n, &_num_par_pushes);
1524 #endif
1525   return true;
1526 }
1527 #undef BUSY
1528 
1529 void ParNewGeneration::ref_processor_init()
1530 {
1531   if (_ref_processor == NULL) {
1532     // Allocate and initialize a reference processor
1533     _ref_processor =
1534       new ReferenceProcessor(_reserved,                  // span
1535                              ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing
1536                              ParallelGCThreads,          // mt processing degree
1537                              refs_discovery_is_mt(),     // mt discovery
1538                              ParallelGCThreads,          // mt discovery degree
1539                              refs_discovery_is_atomic(), // atomic_discovery

1540                              NULL,                       // is_alive_non_header
1541                              false);                     // write barrier for next field updates

1542   }
1543 }
1544 
1545 const char* ParNewGeneration::name() const {
1546   return "par new generation";
1547 }
1548 
1549 bool ParNewGeneration::in_use() {
1550   return UseParNewGC && ParallelGCThreads > 0;
1551 }