< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp

Print this page

271 public:
272 
273   inline HeapWord* base() const { return _heap_region.start(); }
274   inline HeapWord* end()  const { return _heap_region.end(); }
275 
276   inline size_t num_regions() const { return _num_regions; }
277   inline bool is_heap_region_special() { return _heap_region_special; }
278 
279   inline ShenandoahHeapRegion* heap_region_containing(const void* addr) const;
280   inline size_t heap_region_index_containing(const void* addr) const;
281 
282   inline ShenandoahHeapRegion* get_region(size_t region_idx) const;
283 
284   void heap_region_iterate(ShenandoahHeapRegionClosure* blk) const;
285   void parallel_heap_region_iterate(ShenandoahHeapRegionClosure* blk) const;
286 
287   inline ShenandoahMmuTracker* mmu_tracker() { return &_mmu_tracker; };
288 
289 // ---------- GC state machinery
290 //



291 // GC state describes the important parts of collector state, that may be
292 // used to make barrier selection decisions in the native and generated code.
293 // Multiple bits can be set at once.
294 //
295 // Important invariant: when GC state is zero, the heap is stable, and no barriers
296 // are required.
297 //
298 public:
299   enum GCStateBitPos {
300     // Heap has forwarded objects: needs LRB barriers.
301     HAS_FORWARDED_BITPOS   = 0,
302 
303     // Heap is under marking: needs SATB barriers.
304     // For generational mode, it means either young or old marking, or both.
305     MARKING_BITPOS    = 1,
306 
307     // Heap is under evacuation: needs LRB barriers. (Set together with HAS_FORWARDED)
308     EVACUATION_BITPOS = 2,
309 
310     // Heap is under updating: needs no additional barriers.

271 public:
272 
273   inline HeapWord* base() const { return _heap_region.start(); }
274   inline HeapWord* end()  const { return _heap_region.end(); }
275 
276   inline size_t num_regions() const { return _num_regions; }
277   inline bool is_heap_region_special() { return _heap_region_special; }
278 
279   inline ShenandoahHeapRegion* heap_region_containing(const void* addr) const;
280   inline size_t heap_region_index_containing(const void* addr) const;
281 
282   inline ShenandoahHeapRegion* get_region(size_t region_idx) const;
283 
284   void heap_region_iterate(ShenandoahHeapRegionClosure* blk) const;
285   void parallel_heap_region_iterate(ShenandoahHeapRegionClosure* blk) const;
286 
287   inline ShenandoahMmuTracker* mmu_tracker() { return &_mmu_tracker; };
288 
289 // ---------- GC state machinery
290 //
291 // Important: Do not change the values of these flags. AArch64 GC barriers
292 // depend on the flags having specific values.
293 //
294 // GC state describes the important parts of collector state, that may be
295 // used to make barrier selection decisions in the native and generated code.
296 // Multiple bits can be set at once.
297 //
298 // Important invariant: when GC state is zero, the heap is stable, and no barriers
299 // are required.
300 //
301 public:
302   enum GCStateBitPos {
303     // Heap has forwarded objects: needs LRB barriers.
304     HAS_FORWARDED_BITPOS   = 0,
305 
306     // Heap is under marking: needs SATB barriers.
307     // For generational mode, it means either young or old marking, or both.
308     MARKING_BITPOS    = 1,
309 
310     // Heap is under evacuation: needs LRB barriers. (Set together with HAS_FORWARDED)
311     EVACUATION_BITPOS = 2,
312 
313     // Heap is under updating: needs no additional barriers.
< prev index next >