--- old/src/share/vm/gc/g1/g1CollectionSet.hpp 2016-06-28 14:13:05.515439009 +0200 +++ new/src/share/vm/gc/g1/g1CollectionSet.hpp 2016-06-28 14:13:05.426436328 +0200 @@ -26,7 +26,6 @@ #define SHARE_VM_GC_G1_G1COLLECTIONSET_HPP #include "gc/g1/collectionSetChooser.hpp" -#include "gc/g1/g1FixedSizeStack.hpp" #include "memory/allocation.hpp" #include "utilities/debug.hpp" #include "utilities/globalDefinitions.hpp" @@ -49,7 +48,9 @@ uint _old_region_length; // The actual collection set as a set of region indices. - G1FixedSizeStack _collection_set_regions; + uint* _collection_set_regions; + volatile size_t _collection_set_cur_length; + size_t _collection_set_max_length; // The number of bytes in the collection set before the pause. Set from // the incrementally built collection set at the start of an evacuation @@ -127,7 +128,7 @@ uint survivor_region_length() const { return _survivor_region_length; } uint old_region_length() const { return _old_region_length; } - // Incremental collection set Support + // Incremental collection set support // Initialize incremental collection set info. void start_incremental_building(); @@ -137,12 +138,12 @@ void finalize_incremental_building(); // Reset the contents of the collection set. - void clear() { - _collection_set_regions.clear(); - } + void clear(); // Iterate over the collection set, applying the given HeapRegionClosure on all of them. - void iterate(HeapRegionClosure* cl); + // If may_be_aborted is true, iteration may be aborted using the return value of the + // called closure method. + void iterate(HeapRegionClosure* cl, bool may_be_aborted = false); // Iterate over the collection set, applying the given HeapRegionClosure on all of them, // trying to optimally spread out starting position of total_workers workers given the