< prev index next >
src/share/vm/gc_implementation/shenandoah/shenandoahHeapRegionSet.hpp
Print this page
rev 10515 : [backport] Resettable iterators to avoid dealing with copying/assignment compilation differences
rev 10542 : [backport] Constify ShHeapRegionSet and ShCollectionSet
*** 30,66 ****
class ShenandoahHeapRegion;
class ShenandoahHeapRegionSet;
class ShenandoahHeapRegionSetIterator : public StackObj {
private:
! const ShenandoahHeapRegionSet* const _set;
volatile jint _current_index;
ShenandoahHeap* const _heap;
! // No implicit copying: iterators should be passed by reference to capture the state,
! // or be copied explicitly by "=" operator
ShenandoahHeapRegionSetIterator(const ShenandoahHeapRegionSetIterator& that);
public:
ShenandoahHeapRegionSetIterator(const ShenandoahHeapRegionSet* const set);
! ShenandoahHeapRegionSetIterator& operator=(const ShenandoahHeapRegionSetIterator& o);
// MT version
ShenandoahHeapRegion* claim_next();
// Single-thread version
ShenandoahHeapRegion* next();
-
};
class ShenandoahHeapRegionSet : public CHeapObj<mtGC> {
friend class ShenandoahHeap;
private:
ShenandoahHeap* const _heap;
size_t const _map_size;
jbyte* const _set_map;
jbyte* const _biased_set_map;
size_t _region_count;
public:
--- 30,68 ----
class ShenandoahHeapRegion;
class ShenandoahHeapRegionSet;
class ShenandoahHeapRegionSetIterator : public StackObj {
private:
! const ShenandoahHeapRegionSet* _set;
volatile jint _current_index;
ShenandoahHeap* const _heap;
! // No implicit copying: iterators should be passed by reference to capture the state
ShenandoahHeapRegionSetIterator(const ShenandoahHeapRegionSetIterator& that);
+ ShenandoahHeapRegionSetIterator& operator=(const ShenandoahHeapRegionSetIterator& o);
public:
ShenandoahHeapRegionSetIterator(const ShenandoahHeapRegionSet* const set);
! // Reset existing iterator to new set
! void reset(const ShenandoahHeapRegionSet* const set);
// MT version
ShenandoahHeapRegion* claim_next();
// Single-thread version
ShenandoahHeapRegion* next();
};
class ShenandoahHeapRegionSet : public CHeapObj<mtGC> {
friend class ShenandoahHeap;
private:
ShenandoahHeap* const _heap;
size_t const _map_size;
+ size_t const _region_size_bytes_shift;
jbyte* const _set_map;
+ // Bias set map's base address for fast test if an oop is in set
jbyte* const _biased_set_map;
size_t _region_count;
public:
< prev index next >