< prev index next >

src/hotspot/cpu/s390/compiledIC_s390.cpp

Print this page




 102   }
 103 
 104   // Creation also verifies the object.
 105   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub + NativeCall::get_IC_pos_in_java_to_interp_stub());
 106   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
 107 
 108 #ifdef ASSERT
 109   // A generated lambda form might be deleted from the Lambdaform
 110   // cache in MethodTypeForm.  If a jit compiled lambdaform method
 111   // becomes not entrant and the cache access returns null, the new
 112   // resolve will lead to a new generated LambdaForm.
 113   volatile intptr_t data = method_holder->data();
 114   volatile address destination = jump->jump_destination();
 115   assert(data == 0 || data == (intptr_t)callee() || callee->is_compiled_lambda_form(),
 116          "a) MT-unsafe modification of inline cache");
 117   assert(destination == (address)-1 || destination == entry,
 118          "b) MT-unsafe modification of inline cache");
 119 #endif
 120 
 121   // Update stub.
 122   method_holder->set_data((intptr_t)callee(), relocInfo::metadata_type);
 123   jump->set_jump_destination(entry);
 124 
 125   // Update jump to call.
 126   set_destination_mt_safe(stub);
 127 }
 128 
 129 void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
 130   // Reset stub.
 131   address stub = static_stub->addr();
 132   assert(stub != NULL, "stub not found");
 133   assert(CompiledICLocker::is_safe(stub), "mt unsafe call");
 134   // Creation also verifies the object.
 135   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub + NativeCall::get_IC_pos_in_java_to_interp_stub());
 136   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
 137   method_holder->set_data(0, relocInfo::metadata_type);
 138   jump->set_jump_destination((address)-1);
 139 }
 140 
 141 //-----------------------------------------------------------------------------
 142 
 143 #ifndef PRODUCT
 144 
 145 void CompiledDirectStaticCall::verify() {
 146   // Verify call.
 147   _call->verify();
 148   _call->verify_alignment();
 149 
 150   // Verify stub.
 151   address stub = find_stub(/*is_aot*/ false);
 152   assert(stub != NULL, "no stub found for static call");
 153   // Creation also verifies the object.
 154   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub + NativeCall::get_IC_pos_in_java_to_interp_stub());
 155   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
 156 
 157   // Verify state.


 102   }
 103 
 104   // Creation also verifies the object.
 105   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub + NativeCall::get_IC_pos_in_java_to_interp_stub());
 106   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
 107 
 108 #ifdef ASSERT
 109   // A generated lambda form might be deleted from the Lambdaform
 110   // cache in MethodTypeForm.  If a jit compiled lambdaform method
 111   // becomes not entrant and the cache access returns null, the new
 112   // resolve will lead to a new generated LambdaForm.
 113   volatile intptr_t data = method_holder->data();
 114   volatile address destination = jump->jump_destination();
 115   assert(data == 0 || data == (intptr_t)callee() || callee->is_compiled_lambda_form(),
 116          "a) MT-unsafe modification of inline cache");
 117   assert(destination == (address)-1 || destination == entry,
 118          "b) MT-unsafe modification of inline cache");
 119 #endif
 120 
 121   // Update stub.
 122   method_holder->set_data((intptr_t)callee());
 123   jump->set_jump_destination(entry);
 124 
 125   // Update jump to call.
 126   set_destination_mt_safe(stub);
 127 }
 128 
 129 void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
 130   // Reset stub.
 131   address stub = static_stub->addr();
 132   assert(stub != NULL, "stub not found");
 133   assert(CompiledICLocker::is_safe(stub), "mt unsafe call");
 134   // Creation also verifies the object.
 135   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub + NativeCall::get_IC_pos_in_java_to_interp_stub());
 136   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
 137   method_holder->set_data(0);
 138   jump->set_jump_destination((address)-1);
 139 }
 140 
 141 //-----------------------------------------------------------------------------
 142 
 143 #ifndef PRODUCT
 144 
 145 void CompiledDirectStaticCall::verify() {
 146   // Verify call.
 147   _call->verify();
 148   _call->verify_alignment();
 149 
 150   // Verify stub.
 151   address stub = find_stub(/*is_aot*/ false);
 152   assert(stub != NULL, "no stub found for static call");
 153   // Creation also verifies the object.
 154   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub + NativeCall::get_IC_pos_in_java_to_interp_stub());
 155   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
 156 
 157   // Verify state.
< prev index next >