< prev index next >

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

Print this page

286 public:
287 
288   inline HeapWord* base() const { return _heap_region.start(); }
289   inline HeapWord* end()  const { return _heap_region.end(); }
290 
291   inline size_t num_regions() const { return _num_regions; }
292   inline bool is_heap_region_special() { return _heap_region_special; }
293 
294   inline ShenandoahHeapRegion* heap_region_containing(const void* addr) const;
295   inline size_t heap_region_index_containing(const void* addr) const;
296 
297   inline ShenandoahHeapRegion* get_region(size_t region_idx) const;
298 
299   void heap_region_iterate(ShenandoahHeapRegionClosure* blk) const;
300   void parallel_heap_region_iterate(ShenandoahHeapRegionClosure* blk) const;
301 
302   inline ShenandoahMmuTracker* mmu_tracker() { return &_mmu_tracker; };
303 
304 // ---------- GC state machinery
305 //



306 // GC state describes the important parts of collector state, that may be
307 // used to make barrier selection decisions in the native and generated code.
308 // Multiple bits can be set at once.
309 //
310 // Important invariant: when GC state is zero, the heap is stable, and no barriers
311 // are required.
312 //
313 public:
314   enum GCStateBitPos {
315     // Heap has forwarded objects: needs LRB barriers.
316     HAS_FORWARDED_BITPOS   = 0,
317 
318     // Heap is under marking: needs SATB barriers.
319     // For generational mode, it means either young or old marking, or both.
320     MARKING_BITPOS    = 1,
321 
322     // Heap is under evacuation: needs LRB barriers. (Set together with HAS_FORWARDED)
323     EVACUATION_BITPOS = 2,
324 
325     // Heap is under updating: needs no additional barriers.

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