src/cpu/sparc/vm/sharedRuntime_sparc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot-comp Sdiff src/cpu/sparc/vm

src/cpu/sparc/vm/sharedRuntime_sparc.cpp

Print this page
rev 5618 : 8023037: Race between ciEnv::register_method and nmethod::make_not_entrant_or_zombie
Reviewed-by: ?


 985       RegisterOrConstant slot = __ ensure_simm13_or_reg(st_off, Rdisp);
 986       if (!r_2->is_valid()) __ stf(FloatRegisterImpl::S, r_1->as_FloatRegister(), SP, slot);
 987       else                  __ stf(FloatRegisterImpl::D, r_1->as_FloatRegister(), SP, slot);
 988     }
 989   }
 990 
 991   // Jump to the compiled code just as if compiled code was doing it.
 992   __ ld_ptr(G5_method, in_bytes(Method::from_compiled_offset()), G3);
 993 
 994   // 6243940 We might end up in handle_wrong_method if
 995   // the callee is deoptimized as we race thru here. If that
 996   // happens we don't want to take a safepoint because the
 997   // caller frame will look interpreted and arguments are now
 998   // "compiled" so it is much better to make this transition
 999   // invisible to the stack walking code. Unfortunately if
1000   // we try and find the callee by normal means a safepoint
1001   // is possible. So we stash the desired callee in the thread
1002   // and the vm will find there should this case occur.
1003   Address callee_target_addr(G2_thread, JavaThread::callee_target_offset());
1004   __ st_ptr(G5_method, callee_target_addr);
1005 
1006   if (StressNonEntrant) {
1007     // Open a big window for deopt failure
1008     __ save_frame(0);
1009     __ mov(G0, L0);
1010     Label loop;
1011     __ bind(loop);
1012     __ sub(L0, 1, L0);
1013     __ br_null_short(L0, Assembler::pt, loop);
1014     __ restore();
1015   }
1016 
1017   __ jmpl(G3, 0, G0);
1018   __ delayed()->nop();
1019 }
1020 
1021 // ---------------------------------------------------------------
1022 AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
1023                                                             int total_args_passed,
1024                                                             // VMReg max_arg,
1025                                                             int comp_args_on_stack, // VMRegStackSlots
1026                                                             const BasicType *sig_bt,
1027                                                             const VMRegPair *regs,
1028                                                             AdapterFingerPrint* fingerprint) {
1029   address i2c_entry = __ pc();
1030 
1031   AdapterGenerator agen(masm);
1032 
1033   agen.gen_i2c_adapter(total_args_passed, comp_args_on_stack, sig_bt, regs);
1034 
1035 
1036   // -------------------------------------------------------------------------




 985       RegisterOrConstant slot = __ ensure_simm13_or_reg(st_off, Rdisp);
 986       if (!r_2->is_valid()) __ stf(FloatRegisterImpl::S, r_1->as_FloatRegister(), SP, slot);
 987       else                  __ stf(FloatRegisterImpl::D, r_1->as_FloatRegister(), SP, slot);
 988     }
 989   }
 990 
 991   // Jump to the compiled code just as if compiled code was doing it.
 992   __ ld_ptr(G5_method, in_bytes(Method::from_compiled_offset()), G3);
 993 
 994   // 6243940 We might end up in handle_wrong_method if
 995   // the callee is deoptimized as we race thru here. If that
 996   // happens we don't want to take a safepoint because the
 997   // caller frame will look interpreted and arguments are now
 998   // "compiled" so it is much better to make this transition
 999   // invisible to the stack walking code. Unfortunately if
1000   // we try and find the callee by normal means a safepoint
1001   // is possible. So we stash the desired callee in the thread
1002   // and the vm will find there should this case occur.
1003   Address callee_target_addr(G2_thread, JavaThread::callee_target_offset());
1004   __ st_ptr(G5_method, callee_target_addr);












1005   __ jmpl(G3, 0, G0);
1006   __ delayed()->nop();
1007 }
1008 
1009 // ---------------------------------------------------------------
1010 AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
1011                                                             int total_args_passed,
1012                                                             // VMReg max_arg,
1013                                                             int comp_args_on_stack, // VMRegStackSlots
1014                                                             const BasicType *sig_bt,
1015                                                             const VMRegPair *regs,
1016                                                             AdapterFingerPrint* fingerprint) {
1017   address i2c_entry = __ pc();
1018 
1019   AdapterGenerator agen(masm);
1020 
1021   agen.gen_i2c_adapter(total_args_passed, comp_args_on_stack, sig_bt, regs);
1022 
1023 
1024   // -------------------------------------------------------------------------


src/cpu/sparc/vm/sharedRuntime_sparc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File