< prev index next >

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

Print this page
rev 51547 : Refactor to group marking bitmap and TAMS structure in one class ShenandoahMarkingContext
rev 51548 : [mq]: refactor-marking-context.01

@@ -41,10 +41,11 @@
 class ShenandoahCollectorPolicy;
 class ShenandoahConnectionMatrix;
 class ShenandoahControlThread;
 class ShenandoahFastRegionSet;
 class ShenandoahHeuristics;
+class ShenandoahMarkingContext;
 class ShenandoahPhaseTimings;
 class ShenandoahHeap;
 class ShenandoahHeapRegion;
 class ShenandoahHeapRegionClosure;
 class ShenandoahCollectionSet;

@@ -280,21 +281,14 @@
 
   volatile size_t _used;
   volatile size_t _committed;
 
   MarkBitMap _verification_bit_map;
-  MarkBitMap _mark_bit_map0;
-  MarkBitMap _mark_bit_map1;
-  MarkBitMap* _complete_mark_bit_map;
-  MarkBitMap* _next_mark_bit_map;
   MarkBitMap _aux_bit_map;
 
-  HeapWord** _complete_top_at_mark_starts;
-  HeapWord** _complete_top_at_mark_starts_base;
-
-  HeapWord** _next_top_at_mark_starts;
-  HeapWord** _next_top_at_mark_starts_base;
+  ShenandoahMarkingContext* _complete_marking_context;
+  ShenandoahMarkingContext* _next_marking_context;
 
   volatile size_t _bytes_allocated_since_gc_start;
 
   ShenandoahSharedFlag _progress_last_gc;
 

@@ -499,18 +493,10 @@
   inline bool in_collection_set(ShenandoahHeapRegion* r) const;
 
   template <class T>
   inline bool in_collection_set(T obj) const;
 
-  inline bool allocated_after_next_mark_start(HeapWord* addr) const;
-  void set_next_top_at_mark_start(HeapWord* region_base, HeapWord* addr);
-  HeapWord* next_top_at_mark_start(HeapWord* region_base);
-
-  inline bool allocated_after_complete_mark_start(HeapWord* addr) const;
-  void set_complete_top_at_mark_start(HeapWord* region_base, HeapWord* addr);
-  HeapWord* complete_top_at_mark_start(HeapWord* region_base);
-
   // Evacuates object src. Returns the evacuated object if this thread
   // succeeded, otherwise rolls back the evacuation and returns the
   // evacuated object by the competing thread.
   inline oop  evacuate_object(oop src, Thread* thread);
   inline bool cancelled_gc() const;

@@ -539,18 +525,17 @@
   void notify_alloc(size_t words, bool waste);
 
   void reset_next_mark_bitmap();
   void reset_next_mark_bitmap_traversal();
 
-  MarkBitMap* complete_mark_bit_map();
-  MarkBitMap* next_mark_bit_map();
-  inline bool is_marked_complete(oop obj) const;
-  inline bool mark_next(oop obj) const;
-  inline bool is_marked_next(oop obj) const;
-  bool is_next_bitmap_clear();
-  bool is_next_bitmap_clear_range(HeapWord* start, HeapWord* end);
-  bool is_complete_bitmap_clear_range(HeapWord* start, HeapWord* end);
+  inline ShenandoahMarkingContext* complete_marking_context() const {
+    return _complete_marking_context;
+  }
+
+  inline ShenandoahMarkingContext* next_marking_context() const {
+    return _next_marking_context;
+  }
 
   bool commit_bitmap_slice(ShenandoahHeapRegion *r);
   bool uncommit_bitmap_slice(ShenandoahHeapRegion *r);
 
   // Hint that the bitmap slice is not needed

@@ -622,11 +607,11 @@
   template<class T>
   inline void marked_object_oop_safe_iterate(ShenandoahHeapRegion* region, T* cl);
 
   GCTimer* gc_timer() const;
 
-  void swap_mark_bitmaps();
+  void swap_mark_contexts();
 
   void cancel_gc(GCCause::Cause cause);
 
   ShenandoahHeapLock* lock() { return &_lock; }
   void assert_heaplock_owned_by_current_thread() PRODUCT_RETURN;
< prev index next >