< prev index next >

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

Concurrent class unloading

117   template <class BarrierSetC2T>                                                                                                     
118   static BarrierSetC2* make_barrier_set_c2() {                                                                                       
119     return COMPILER2_PRESENT(new BarrierSetC2T()) NOT_COMPILER2(NULL);                                                               
120   }                                                                                                                                  
121 
122 public:                                                                                                                              
123   // Support for optimizing compilers to call the barrier set on slow path allocations                                               
124   // that did not enter a TLAB. Used for e.g. ReduceInitialCardMarks.                                                                
125   // The allocation is safe to use iff it returns true. If not, the slow-path allocation                                             
126   // is redone until it succeeds. This can e.g. prevent allocations from the slow path                                               
127   // to be in old.                                                                                                                   
128   virtual void on_slowpath_allocation_exit(JavaThread* thread, oop new_obj) {}                                                       
129   virtual void on_thread_create(Thread* thread) {}                                                                                   
130   virtual void on_thread_destroy(Thread* thread) {}                                                                                  
131   virtual void on_thread_attach(JavaThread* thread) {}                                                                               
132   virtual void on_thread_detach(JavaThread* thread) {}                                                                               
133   virtual void make_parsable(JavaThread* thread) {}                                                                                  
134 
135   // nmethod entry barrier support                                                                                                   
136   virtual bool needs_nmethod_entry_barrier() const { return false; }                                                                 
                                                                                                                                     
137   virtual ByteSize nmethod_entry_barrier_state_thread_offset() const { return in_ByteSize(0); }                                      
138   virtual bool on_nmethod_entry_barrier(nmethod* nm, nmethodBarrier* nmbarrier);                                                     
139 
140 public:                                                                                                                              
141   // Print a description of the memory for the barrier set                                                                           
142   virtual void print_on(outputStream* st) const = 0;                                                                                 
143 
144   static BarrierSet* barrier_set() { return _barrier_set; }                                                                          
145   static void set_barrier_set(BarrierSet* barrier_set);                                                                              
146 
147   BarrierSetAssembler* barrier_set_assembler() {                                                                                     
148     assert(_barrier_set_assembler != NULL, "should be set");                                                                         
149     return _barrier_set_assembler;                                                                                                   
150   }                                                                                                                                  
151 
152   BarrierSetC1* barrier_set_c1() {                                                                                                   
153     assert(_barrier_set_c1 != NULL, "should be set");                                                                                
154     return _barrier_set_c1;                                                                                                          
155   }                                                                                                                                  

117   template <class BarrierSetC2T>
118   static BarrierSetC2* make_barrier_set_c2() {
119     return COMPILER2_PRESENT(new BarrierSetC2T()) NOT_COMPILER2(NULL);
120   }
121 
122 public:
123   // Support for optimizing compilers to call the barrier set on slow path allocations
124   // that did not enter a TLAB. Used for e.g. ReduceInitialCardMarks.
125   // The allocation is safe to use iff it returns true. If not, the slow-path allocation
126   // is redone until it succeeds. This can e.g. prevent allocations from the slow path
127   // to be in old.
128   virtual void on_slowpath_allocation_exit(JavaThread* thread, oop new_obj) {}
129   virtual void on_thread_create(Thread* thread) {}
130   virtual void on_thread_destroy(Thread* thread) {}
131   virtual void on_thread_attach(JavaThread* thread) {}
132   virtual void on_thread_detach(JavaThread* thread) {}
133   virtual void make_parsable(JavaThread* thread) {}
134 
135   // nmethod entry barrier support
136   virtual bool needs_nmethod_entry_barrier() const { return false; }
137   virtual int nmethod_entry_barrier_state() const { return 0; }
138   virtual ByteSize nmethod_entry_barrier_state_thread_offset() const { return in_ByteSize(0); }
139   virtual bool on_nmethod_entry_barrier(nmethod* nm, nmethodBarrier* nmbarrier);
140 
141 public:
142   // Print a description of the memory for the barrier set
143   virtual void print_on(outputStream* st) const = 0;
144 
145   static BarrierSet* barrier_set() { return _barrier_set; }
146   static void set_barrier_set(BarrierSet* barrier_set);
147 
148   BarrierSetAssembler* barrier_set_assembler() {
149     assert(_barrier_set_assembler != NULL, "should be set");
150     return _barrier_set_assembler;
151   }
152 
153   BarrierSetC1* barrier_set_c1() {
154     assert(_barrier_set_c1 != NULL, "should be set");
155     return _barrier_set_c1;
156   }
< prev index next >