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