< prev index next >

src/hotspot/share/gc/cms/parNewGeneration.cpp

Print this page
rev 49912 : imported patch 8201492-properly-implement-non-contiguous-reference-processing
rev 49913 : imported patch 8201492-stefanj-review
rev 49914 : [mq]: 8201492-kim-review


1454       assert(arrayOop(cur)->length() == 0, "entire array remaining to be scanned");
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 }


1454       assert(arrayOop(cur)->length() == 0, "entire array remaining to be scanned");
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     _span_based_discoverer.set_span(_reserved);
1475     _ref_processor =
1476       new ReferenceProcessor(&_span_based_discoverer,    // span
1477                              ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing
1478                              ParallelGCThreads,          // mt processing degree
1479                              refs_discovery_is_mt(),     // mt discovery
1480                              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 }
1489 
1490 void ParNewGeneration::restore_preserved_marks() {
1491   SharedRestorePreservedMarksTaskExecutor task_executor(CMSHeap::heap()->workers());
1492   _preserved_marks_set.restore(&task_executor);
1493 }
< prev index next >