Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
          +++ new/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
↓ open down ↓ 1522 lines elided ↑ open up ↑
1523 1523    Atomic::add_ptr(-(intptr_t)n, &_num_par_pushes);
1524 1524  #endif
1525 1525    return true;
1526 1526  }
1527 1527  #undef BUSY
1528 1528  
1529 1529  void ParNewGeneration::ref_processor_init()
1530 1530  {
1531 1531    if (_ref_processor == NULL) {
1532 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);
     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
1540 1542    }
1541 1543  }
1542 1544  
1543 1545  const char* ParNewGeneration::name() const {
1544 1546    return "par new generation";
1545 1547  }
1546 1548  
1547 1549  bool ParNewGeneration::in_use() {
1548 1550    return UseParNewGC && ParallelGCThreads > 0;
1549 1551  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX