--- old/src/share/vm/gc/g1/g1CollectedHeap.hpp 2016-06-28 14:12:48.928939358 +0200 +++ new/src/share/vm/gc/g1/g1CollectedHeap.hpp 2016-06-28 14:12:48.839936677 +0200 @@ -778,13 +778,13 @@ // The closure used to refine a single card. RefineCardTableEntryClosure* _refine_cte_cl; - // After a collection pause, make the regions in the CS into free + // After a collection pause, convert the regions in the collection set into free // regions. - void free_collection_set(HeapRegion* cs_head, EvacuationInfo& evacuation_info, const size_t* surviving_young_words); + void free_collection_set(G1CollectionSet* collection_set, EvacuationInfo& evacuation_info, const size_t* surviving_young_words); // Abandon the current collection set without recording policy // statistics or updating free lists. - void abandon_collection_set(HeapRegion* cs_head); + void abandon_collection_set(G1CollectionSet* collection_set); // The concurrent marker (and the thread it runs in.) G1ConcurrentMark* _cm; @@ -930,16 +930,6 @@ // discovery. G1CMIsAliveClosure _is_alive_closure_cm; - // Cache used by G1CollectedHeap::start_cset_region_for_worker(). - HeapRegion** _worker_cset_start_region; - - // Time stamp to validate the regions recorded in the cache - // used by G1CollectedHeap::start_cset_region_for_worker(). - // The heap region entry for a given worker is valid iff - // the associated time stamp value matches the current value - // of G1CollectedHeap::_gc_time_stamp. - uint* _worker_cset_start_region_time_stamp; - volatile bool _free_regions_coming; public: @@ -1211,19 +1201,14 @@ HeapRegionClaimer* hrclaimer, bool concurrent = false) const; - // Clear the cached cset start regions and (more importantly) - // the time stamps. Called when we reset the GC time stamp. - void clear_cset_start_regions(); - - // Given the id of a worker, obtain or calculate a suitable - // starting region for iterating over the current collection set. - HeapRegion* start_cset_region_for_worker(uint worker_i); - // Iterate over the regions (if any) in the current collection set. void collection_set_iterate(HeapRegionClosure* blk); - // As above but starting from region r - void collection_set_iterate_from(HeapRegion* r, HeapRegionClosure *blk); + // Iterate over the regions (if any) in the current collection set. Starts the + // iteration over the entire collection set so that the start regions of a given + // worker id over the set active_workers are evenly spread across the set of + // collection set regions. + void collection_set_iterate_from(HeapRegionClosure *blk, uint worker_id); HeapRegion* next_compaction_region(const HeapRegion* from) const;