< prev index next >

src/hotspot/cpu/ppc/gc/shared/barrierSetNMethod_ppc.cpp

Print this page

139                             (TrapBasedNMethodEntryBarriers ? 4 : 8) * BytesPerInstWord;
140   if (bs_asm->nmethod_patching_type() != NMethodPatchingType::stw_instruction_and_data_patch) {
141     barrier_address -= BytesPerInstWord; // isync (see nmethod_entry_barrier)
142   }
143 
144   auto barrier = reinterpret_cast<NativeNMethodBarrier*>(barrier_address);
145   DEBUG_ONLY(barrier->verify());
146   return barrier;
147 }
148 
149 void BarrierSetNMethod::deoptimize(nmethod* nm, address* return_address_ptr) {
150   // As PPC64 always has a valid back chain (unlike other platforms), the stub can simply pop the frame.
151   // Thus, there's nothing to do here.
152 }
153 
154 void BarrierSetNMethod::set_guard_value(nmethod* nm, int value, int bit_mask) {
155   if (!supports_entry_barrier(nm)) {
156     return;
157   }
158 


159   NativeNMethodBarrier* barrier = get_nmethod_barrier(nm);
160   barrier->release_set_guard_value(value, bit_mask);
161 }
162 
163 int BarrierSetNMethod::guard_value(nmethod* nm) {
164   if (!supports_entry_barrier(nm)) {
165     return disarmed_guard_value();
166   }
167 
168   NativeNMethodBarrier* barrier = get_nmethod_barrier(nm);
169   return barrier->get_guard_value();
170 }

139                             (TrapBasedNMethodEntryBarriers ? 4 : 8) * BytesPerInstWord;
140   if (bs_asm->nmethod_patching_type() != NMethodPatchingType::stw_instruction_and_data_patch) {
141     barrier_address -= BytesPerInstWord; // isync (see nmethod_entry_barrier)
142   }
143 
144   auto barrier = reinterpret_cast<NativeNMethodBarrier*>(barrier_address);
145   DEBUG_ONLY(barrier->verify());
146   return barrier;
147 }
148 
149 void BarrierSetNMethod::deoptimize(nmethod* nm, address* return_address_ptr) {
150   // As PPC64 always has a valid back chain (unlike other platforms), the stub can simply pop the frame.
151   // Thus, there's nothing to do here.
152 }
153 
154 void BarrierSetNMethod::set_guard_value(nmethod* nm, int value, int bit_mask) {
155   if (!supports_entry_barrier(nm)) {
156     return;
157   }
158 
159   assert(nm->is_osr_method() || !nm->method()->has_scalarized_args(), "unsupported");
160 
161   NativeNMethodBarrier* barrier = get_nmethod_barrier(nm);
162   barrier->release_set_guard_value(value, bit_mask);
163 }
164 
165 int BarrierSetNMethod::guard_value(nmethod* nm) {
166   if (!supports_entry_barrier(nm)) {
167     return disarmed_guard_value();
168   }
169 
170   NativeNMethodBarrier* barrier = get_nmethod_barrier(nm);
171   return barrier->get_guard_value();
172 }
< prev index next >