1.1 --- a/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Tue Jul 17 12:24:05 2012 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Thu Jul 19 15:15:54 2012 -0700 1.3 @@ -262,18 +262,6 @@ 1.4 } 1.5 }; 1.6 1.7 -// Finds the first HeapRegion. 1.8 -class FindFirstRegionClosure: public HeapRegionClosure { 1.9 - HeapRegion* _a_region; 1.10 -public: 1.11 - FindFirstRegionClosure() : _a_region(NULL) {} 1.12 - bool doHeapRegion(HeapRegion* r) { 1.13 - _a_region = r; 1.14 - return true; 1.15 - } 1.16 - HeapRegion* result() { return _a_region; } 1.17 -}; 1.18 - 1.19 void G1MarkSweep::mark_sweep_phase2() { 1.20 // Now all live objects are marked, compute the new object addresses. 1.21 1.22 @@ -294,9 +282,8 @@ 1.23 TraceTime tm("phase 2", G1Log::fine() && Verbose, true, gclog_or_tty); 1.24 GenMarkSweep::trace("2"); 1.25 1.26 - FindFirstRegionClosure cl; 1.27 - g1h->heap_region_iterate(&cl); 1.28 - HeapRegion *r = cl.result(); 1.29 + // find the first region 1.30 + HeapRegion* r = g1h->region_at(0); 1.31 CompactibleSpace* sp = r; 1.32 if (r->isHumongous() && oop(r->bottom())->is_gc_marked()) { 1.33 sp = r->next_compaction_space(); 1.34 @@ -408,7 +395,3 @@ 1.35 g1h->heap_region_iterate(&blk); 1.36 1.37 } 1.38 - 1.39 -// Local Variables: *** 1.40 -// c-indentation-style: gnu *** 1.41 -// End: ***