src/share/vm/gc_implementation/g1/concurrentMark.cpp

changeset 2316
fd1d227ef1b9
parent 2314
f95d63e2154a
child 2379
b03260081e9b
     1.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Tue Aug 24 17:24:33 2010 -0400
     1.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Wed Dec 01 17:34:02 2010 -0800
     1.3 @@ -1051,6 +1051,7 @@
     1.4    void work(int worker_i) {
     1.5      assert(Thread::current()->is_ConcurrentGC_thread(),
     1.6             "this should only be done by a conc GC thread");
     1.7 +    ResourceMark rm;
     1.8  
     1.9      double start_vtime = os::elapsedVTime();
    1.10  
    1.11 @@ -1888,6 +1889,9 @@
    1.12    G1CollectedHeap* g1h   = G1CollectedHeap::heap();
    1.13    ReferenceProcessor* rp = g1h->ref_processor();
    1.14  
    1.15 +  // See the comment in G1CollectedHeap::ref_processing_init()
    1.16 +  // about how reference processing currently works in G1.
    1.17 +
    1.18    // Process weak references.
    1.19    rp->setup_policy(clear_all_soft_refs);
    1.20    assert(_markStack.isEmpty(), "mark stack should be empty");
    1.21 @@ -2918,7 +2922,11 @@
    1.22    CMOopClosure(G1CollectedHeap* g1h,
    1.23                 ConcurrentMark* cm,
    1.24                 CMTask* task)
    1.25 -    : _g1h(g1h), _cm(cm), _task(task) { }
    1.26 +    : _g1h(g1h), _cm(cm), _task(task)
    1.27 +  {
    1.28 +    _ref_processor = g1h->ref_processor();
    1.29 +    assert(_ref_processor != NULL, "should not be NULL");
    1.30 +  }
    1.31  };
    1.32  
    1.33  void CMTask::setup_for_region(HeapRegion* hr) {

mercurial