1.1 --- a/src/share/vm/gc_implementation/g1/g1RemSet.cpp Mon Jun 20 22:03:13 2011 -0400 1.2 +++ b/src/share/vm/gc_implementation/g1/g1RemSet.cpp Tue Jun 21 15:23:07 2011 -0400 1.3 @@ -297,31 +297,6 @@ 1.4 _g1p->record_update_rs_time(worker_i, (os::elapsedTime() - start) * 1000.0); 1.5 } 1.6 1.7 -#ifndef PRODUCT 1.8 -class PrintRSClosure : public HeapRegionClosure { 1.9 - int _count; 1.10 -public: 1.11 - PrintRSClosure() : _count(0) {} 1.12 - bool doHeapRegion(HeapRegion* r) { 1.13 - HeapRegionRemSet* hrrs = r->rem_set(); 1.14 - _count += (int) hrrs->occupied(); 1.15 - if (hrrs->occupied() == 0) { 1.16 - gclog_or_tty->print("Heap Region [" PTR_FORMAT ", " PTR_FORMAT ") " 1.17 - "has no remset entries\n", 1.18 - r->bottom(), r->end()); 1.19 - } else { 1.20 - gclog_or_tty->print("Printing rem set for heap region [" PTR_FORMAT ", " PTR_FORMAT ")\n", 1.21 - r->bottom(), r->end()); 1.22 - r->print(); 1.23 - hrrs->print(); 1.24 - gclog_or_tty->print("\nDone printing rem set\n"); 1.25 - } 1.26 - return false; 1.27 - } 1.28 - int occupied() {return _count;} 1.29 -}; 1.30 -#endif 1.31 - 1.32 class CountRSSizeClosure: public HeapRegionClosure { 1.33 size_t _n; 1.34 size_t _tot; 1.35 @@ -447,10 +422,6 @@ 1.36 } 1.37 1.38 void G1RemSet::prepare_for_oops_into_collection_set_do() { 1.39 -#if G1_REM_SET_LOGGING 1.40 - PrintRSClosure cl; 1.41 - _g1->collection_set_iterate(&cl); 1.42 -#endif 1.43 cleanupHRRS(); 1.44 ConcurrentG1Refine* cg1r = _g1->concurrent_g1_refine(); 1.45 _g1->set_refine_cte_cl_concurrency(false); 1.46 @@ -469,14 +440,6 @@ 1.47 } 1.48 1.49 1.50 -class cleanUpIteratorsClosure : public HeapRegionClosure { 1.51 - bool doHeapRegion(HeapRegion *r) { 1.52 - HeapRegionRemSet* hrrs = r->rem_set(); 1.53 - hrrs->init_for_par_iteration(); 1.54 - return false; 1.55 - } 1.56 -}; 1.57 - 1.58 // This closure, applied to a DirtyCardQueueSet, is used to immediately 1.59 // update the RSets for the regions in the CSet. For each card it iterates 1.60 // through the oops which coincide with that card. It scans the reference 1.61 @@ -537,18 +500,13 @@ 1.62 void G1RemSet::cleanup_after_oops_into_collection_set_do() { 1.63 guarantee( _cards_scanned != NULL, "invariant" ); 1.64 _total_cards_scanned = 0; 1.65 - for (uint i = 0; i < n_workers(); ++i) 1.66 + for (uint i = 0; i < n_workers(); ++i) { 1.67 _total_cards_scanned += _cards_scanned[i]; 1.68 + } 1.69 FREE_C_HEAP_ARRAY(size_t, _cards_scanned); 1.70 _cards_scanned = NULL; 1.71 // Cleanup after copy 1.72 -#if G1_REM_SET_LOGGING 1.73 - PrintRSClosure cl; 1.74 - _g1->heap_region_iterate(&cl); 1.75 -#endif 1.76 _g1->set_refine_cte_cl_concurrency(true); 1.77 - cleanUpIteratorsClosure iterClosure; 1.78 - _g1->collection_set_iterate(&iterClosure); 1.79 // Set all cards back to clean. 1.80 _g1->cleanUpCardTable(); 1.81