< prev index next >

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

Print this page

        

@@ -24,10 +24,11 @@
 #ifndef SHARE_GC_SHENANDOAH_SHENANDOAHTHREADLOCALDATA_HPP
 #define SHARE_GC_SHENANDOAH_SHENANDOAHTHREADLOCALDATA_HPP
 
 #include "gc/shared/plab.hpp"
 #include "gc/shenandoah/shenandoahBarrierSet.hpp"
+#include "gc/shenandoah/shenandoahCodeRoots.hpp"
 #include "gc/shenandoah/shenandoahSATBMarkQueueSet.hpp"
 #include "runtime/thread.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/sizes.hpp"
 

@@ -41,10 +42,11 @@
   ShenandoahSATBMarkQueue _satb_mark_queue;
   PLAB* _gclab;
   size_t _gclab_size;
   uint  _worker_id;
   bool _force_satb_flush;
+  int  _disarmed_value;
 
   ShenandoahThreadLocalData() :
     _gc_state(0),
     _oom_during_evac(0),
     _satb_mark_queue(&ShenandoahBarrierSet::satb_mark_queue_set()),

@@ -123,10 +125,11 @@
   static void initialize_gclab(Thread* thread) {
     assert (thread->is_Java_thread() || thread->is_Worker_thread(), "Only Java and GC worker threads are allowed to get GCLABs");
     assert(data(thread)->_gclab == NULL, "Only initialize once");
     data(thread)->_gclab = new PLAB(PLAB::min_size());
     data(thread)->_gclab_size = 0;
+    data(thread)->_disarmed_value = ShenandoahCodeRoots::disarmed_value();
   }
 
   static PLAB* gclab(Thread* thread) {
     return data(thread)->_gclab;
   }

@@ -137,10 +140,14 @@
 
   static void set_gclab_size(Thread* thread, size_t v) {
     data(thread)->_gclab_size = v;
   }
 
+  static void set_disarmed_value(Thread* thread, int value) {
+    data(thread)->_disarmed_value = value;
+  }
+
 #ifdef ASSERT
   static void set_evac_allowed(Thread* thread, bool evac_allowed) {
     if (evac_allowed) {
       data(thread)->_oom_during_evac |= 2;
     } else {

@@ -168,8 +175,11 @@
 
   static ByteSize gc_state_offset() {
     return Thread::gc_data_offset() + byte_offset_of(ShenandoahThreadLocalData, _gc_state);
   }
 
+  static ByteSize disarmed_value_offset() {
+    return Thread::gc_data_offset() + byte_offset_of(ShenandoahThreadLocalData, _disarmed_value);
+  }
 };
 
 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHTHREADLOCALDATA_HPP
< prev index next >