Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
          +++ new/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
↓ open down ↓ 819 lines elided ↑ open up ↑
 820  820  void PSParallelCompact::FollowStackClosure::do_void() { _compaction_manager->follow_marking_stacks(); }
 821  821  
 822  822  void PSParallelCompact::MarkAndPushClosure::do_oop(oop* p)       { mark_and_push(_compaction_manager, p); }
 823  823  void PSParallelCompact::MarkAndPushClosure::do_oop(narrowOop* p) { mark_and_push(_compaction_manager, p); }
 824  824  
 825  825  void PSParallelCompact::post_initialize() {
 826  826    ParallelScavengeHeap* heap = gc_heap();
 827  827    assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity");
 828  828  
 829  829    MemRegion mr = heap->reserved_region();
 830      -  _ref_processor = ReferenceProcessor::create_ref_processor(
 831      -    mr,                         // span
 832      -    true,                       // atomic_discovery
 833      -    true,                       // mt_discovery
 834      -    &_is_alive_closure,
 835      -    ParallelGCThreads,
 836      -    ParallelRefProcEnabled);
      830 +  _ref_processor =
      831 +    new ReferenceProcessor(mr,            // span
      832 +                           ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing
      833 +                           ParallelGCThreads, // mt processing degree
      834 +                           true,          // mt discovery
      835 +                           ParallelGCThreads, // mt discovery degree
      836 +                           true,          // atomic_discovery
      837 +                           &_is_alive_closure, // non-header is alive closure
      838 +                           false);        // write barrier for next field updates
 837  839    _counters = new CollectorCounters("PSParallelCompact", 1);
 838  840  
 839  841    // Initialize static fields in ParCompactionManager.
 840  842    ParCompactionManager::initialize(mark_bitmap());
 841  843  }
 842  844  
 843  845  bool PSParallelCompact::initialize() {
 844  846    ParallelScavengeHeap* heap = gc_heap();
 845  847    assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity");
 846  848    MemRegion mr = heap->reserved_region();
↓ open down ↓ 2710 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX