< prev index next >

src/hotspot/share/gc/shared/barrierSet.hpp

Print this page

        

@@ -40,22 +40,20 @@
 // the rest of the system.
 
 class BarrierSet: public CHeapObj<mtGC> {
   friend class VMStructs;
 
-  static BarrierSet* _bs;
+  static BarrierSet* _barrier_set;
 
 public:
   enum Name {
 #define BARRIER_SET_DECLARE_BS_ENUM(bs_name) bs_name ,
     FOR_EACH_BARRIER_SET_DO(BARRIER_SET_DECLARE_BS_ENUM)
 #undef BARRIER_SET_DECLARE_BS_ENUM
     UnknownBS
   };
 
-  static BarrierSet* barrier_set() { return _bs; }
-
 protected:
   // Fake RTTI support.  For a derived class T to participate
   // - T must have a corresponding Name entry.
   // - GetName<T> must be specialized to return the corresponding Name
   //   entry.

@@ -105,19 +103,22 @@
   // that did not enter a TLAB. Used for e.g. ReduceInitialCardMarks.
   // The allocation is safe to use iff it returns true. If not, the slow-path allocation
   // is redone until it succeeds. This can e.g. prevent allocations from the slow path
   // to be in old.
   virtual void on_slowpath_allocation_exit(JavaThread* thread, oop new_obj) {}
+  virtual void on_thread_create(Thread* thread) {}
+  virtual void on_thread_destroy(Thread* thread) {}
   virtual void on_thread_attach(JavaThread* thread) {}
   virtual void on_thread_detach(JavaThread* thread) {}
   virtual void make_parsable(JavaThread* thread) {}
 
 public:
   // Print a description of the memory for the barrier set
   virtual void print_on(outputStream* st) const = 0;
 
-  static void set_bs(BarrierSet* bs) { _bs = bs; }
+  static BarrierSet* barrier_set() { return _barrier_set; }
+  static void set_barrier_set(BarrierSet* barrier_set);
 
   BarrierSetAssembler* barrier_set_assembler() {
     assert(_barrier_set_assembler != NULL, "should be set");
     return _barrier_set_assembler;
   }
< prev index next >