2468 G1CollectorPolicy_BestRegionsFirst:: |
2468 G1CollectorPolicy_BestRegionsFirst:: |
2469 record_collection_pause_start(double start_time_sec, size_t start_used) { |
2469 record_collection_pause_start(double start_time_sec, size_t start_used) { |
2470 G1CollectorPolicy::record_collection_pause_start(start_time_sec, start_used); |
2470 G1CollectorPolicy::record_collection_pause_start(start_time_sec, start_used); |
2471 } |
2471 } |
2472 |
2472 |
2473 class NextNonCSElemFinder: public HeapRegionClosure { |
|
2474 HeapRegion* _res; |
|
2475 public: |
|
2476 NextNonCSElemFinder(): _res(NULL) {} |
|
2477 bool doHeapRegion(HeapRegion* r) { |
|
2478 if (!r->in_collection_set()) { |
|
2479 _res = r; |
|
2480 return true; |
|
2481 } else { |
|
2482 return false; |
|
2483 } |
|
2484 } |
|
2485 HeapRegion* res() { return _res; } |
|
2486 }; |
|
2487 |
|
2488 class KnownGarbageClosure: public HeapRegionClosure { |
2473 class KnownGarbageClosure: public HeapRegionClosure { |
2489 CollectionSetChooser* _hrSorted; |
2474 CollectionSetChooser* _hrSorted; |
2490 |
2475 |
2491 public: |
2476 public: |
2492 KnownGarbageClosure(CollectionSetChooser* hrSorted) : |
2477 KnownGarbageClosure(CollectionSetChooser* hrSorted) : |