1.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp Thu Dec 16 09:14:34 2010 -0800 1.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp Fri Dec 17 11:26:53 2010 -0800 1.3 @@ -1825,23 +1825,11 @@ 1.4 } 1.5 } 1.6 1.7 - 1.8 -class G1CMIsAliveClosure: public BoolObjectClosure { 1.9 - G1CollectedHeap* _g1; 1.10 - public: 1.11 - G1CMIsAliveClosure(G1CollectedHeap* g1) : 1.12 - _g1(g1) 1.13 - {} 1.14 - 1.15 - void do_object(oop obj) { 1.16 - assert(false, "not to be invoked"); 1.17 - } 1.18 - bool do_object_b(oop obj) { 1.19 - HeapWord* addr = (HeapWord*)obj; 1.20 - return addr != NULL && 1.21 - (!_g1->is_in_g1_reserved(addr) || !_g1->is_obj_ill(obj)); 1.22 - } 1.23 -}; 1.24 +bool G1CMIsAliveClosure::do_object_b(oop obj) { 1.25 + HeapWord* addr = (HeapWord*)obj; 1.26 + return addr != NULL && 1.27 + (!_g1->is_in_g1_reserved(addr) || !_g1->is_obj_ill(obj)); 1.28 +} 1.29 1.30 class G1CMKeepAliveClosure: public OopClosure { 1.31 G1CollectedHeap* _g1; 1.32 @@ -1896,16 +1884,15 @@ 1.33 rp->setup_policy(clear_all_soft_refs); 1.34 assert(_markStack.isEmpty(), "mark stack should be empty"); 1.35 1.36 - G1CMIsAliveClosure g1IsAliveClosure (g1h); 1.37 - G1CMKeepAliveClosure g1KeepAliveClosure(g1h, this, nextMarkBitMap()); 1.38 + G1CMIsAliveClosure g1_is_alive(g1h); 1.39 + G1CMKeepAliveClosure g1_keep_alive(g1h, this, nextMarkBitMap()); 1.40 G1CMDrainMarkingStackClosure 1.41 - g1DrainMarkingStackClosure(nextMarkBitMap(), &_markStack, 1.42 - &g1KeepAliveClosure); 1.43 + g1_drain_mark_stack(nextMarkBitMap(), &_markStack, &g1_keep_alive); 1.44 1.45 // XXXYYY Also: copy the parallel ref processing code from CMS. 1.46 - rp->process_discovered_references(&g1IsAliveClosure, 1.47 - &g1KeepAliveClosure, 1.48 - &g1DrainMarkingStackClosure, 1.49 + rp->process_discovered_references(&g1_is_alive, 1.50 + &g1_keep_alive, 1.51 + &g1_drain_mark_stack, 1.52 NULL); 1.53 assert(_markStack.overflow() || _markStack.isEmpty(), 1.54 "mark stack should be empty (unless it overflowed)"); 1.55 @@ -1918,8 +1905,8 @@ 1.56 assert(!rp->discovery_enabled(), "should have been disabled"); 1.57 1.58 // Now clean up stale oops in SymbolTable and StringTable 1.59 - SymbolTable::unlink(&g1IsAliveClosure); 1.60 - StringTable::unlink(&g1IsAliveClosure); 1.61 + SymbolTable::unlink(&g1_is_alive); 1.62 + StringTable::unlink(&g1_is_alive); 1.63 } 1.64 1.65 void ConcurrentMark::swapMarkBitMaps() {