< prev index next >
src/share/vm/gc/g1/g1CollectionSet.hpp
Print this page
rev 11545 : [mq]: 8159978-collection-set-as-array
rev 11546 : [mq]: 8159978-erikh-review
@@ -24,11 +24,10 @@
#ifndef SHARE_VM_GC_G1_G1COLLECTIONSET_HPP
#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"
class G1CollectedHeap;
@@ -47,11 +46,13 @@
uint _eden_region_length;
uint _survivor_region_length;
uint _old_region_length;
// The actual collection set as a set of region indices.
- G1FixedSizeStack<uint> _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
// pause, and incremented in finalize_old_part() when adding old regions
// (if any) to the collection set.
@@ -125,26 +126,26 @@
uint eden_region_length() const { return _eden_region_length; }
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();
// Perform any final calculations on the incremental collection set fields
// before we can use them.
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
// caller's worker_id.
// If may_be_aborted is true, iteration may be aborted using the return value of the
< prev index next >