1.1 --- a/src/share/vm/code/compiledIC.cpp Thu Apr 11 23:06:33 2013 -0400 1.2 +++ b/src/share/vm/code/compiledIC.cpp Wed Apr 24 20:55:28 2013 -0400 1.3 @@ -45,25 +45,6 @@ 1.4 // Every time a compiled IC is changed or its type is being accessed, 1.5 // either the CompiledIC_lock must be set or we must be at a safe point. 1.6 1.7 - 1.8 -// Release the CompiledICHolder* associated with this call site is there is one. 1.9 -void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) { 1.10 - // This call site might have become stale so inspect it carefully. 1.11 - NativeCall* call = nativeCall_at(call_site->addr()); 1.12 - if (is_icholder_entry(call->destination())) { 1.13 - NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value()); 1.14 - InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data()); 1.15 - } 1.16 -} 1.17 - 1.18 - 1.19 -bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) { 1.20 - // This call site might have become stale so inspect it carefully. 1.21 - NativeCall* call = nativeCall_at(call_site->addr()); 1.22 - return is_icholder_entry(call->destination()); 1.23 -} 1.24 - 1.25 - 1.26 //----------------------------------------------------------------------------- 1.27 // Low-level access to an inline cache. Private, since they might not be 1.28 // MT-safe to use. 1.29 @@ -488,33 +469,6 @@ 1.30 return (cb != NULL && cb->is_adapter_blob()); 1.31 } 1.32 1.33 - 1.34 -CompiledIC::CompiledIC(nmethod* nm, NativeCall* call) 1.35 - : _ic_call(call) 1.36 -{ 1.37 - address ic_call = call->instruction_address(); 1.38 - 1.39 - assert(ic_call != NULL, "ic_call address must be set"); 1.40 - assert(nm != NULL, "must pass nmethod"); 1.41 - assert(nm->contains(ic_call), "must be in nmethod"); 1.42 - 1.43 - // search for the ic_call at the given address 1.44 - RelocIterator iter(nm, ic_call, ic_call+1); 1.45 - bool ret = iter.next(); 1.46 - assert(ret == true, "relocInfo must exist at this address"); 1.47 - assert(iter.addr() == ic_call, "must find ic_call"); 1.48 - if (iter.type() == relocInfo::virtual_call_type) { 1.49 - virtual_call_Relocation* r = iter.virtual_call_reloc(); 1.50 - _is_optimized = false; 1.51 - _value = nativeMovConstReg_at(r->cached_value()); 1.52 - } else { 1.53 - assert(iter.type() == relocInfo::opt_virtual_call_type, "must be a virtual call"); 1.54 - _is_optimized = true; 1.55 - _value = NULL; 1.56 -} 1.57 -} 1.58 - 1.59 - 1.60 // ---------------------------------------------------------------------------- 1.61 1.62 void CompiledStaticCall::set_to_clean() { 1.63 @@ -549,33 +503,6 @@ 1.64 return nm->stub_contains(destination()); 1.65 } 1.66 1.67 - 1.68 -void CompiledStaticCall::set_to_interpreted(methodHandle callee, address entry) { 1.69 - address stub=find_stub(); 1.70 - guarantee(stub != NULL, "stub not found"); 1.71 - 1.72 - if (TraceICs) { 1.73 - ResourceMark rm; 1.74 - tty->print_cr("CompiledStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s", 1.75 - instruction_address(), 1.76 - callee->name_and_sig_as_C_string()); 1.77 - } 1.78 - 1.79 - NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); // creation also verifies the object 1.80 - NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); 1.81 - 1.82 - assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee(), "a) MT-unsafe modification of inline cache"); 1.83 - assert(jump->jump_destination() == (address)-1 || jump->jump_destination() == entry, "b) MT-unsafe modification of inline cache"); 1.84 - 1.85 - // Update stub 1.86 - method_holder->set_data((intptr_t)callee()); 1.87 - jump->set_jump_destination(entry); 1.88 - 1.89 - // Update jump to call 1.90 - set_destination_mt_safe(stub); 1.91 -} 1.92 - 1.93 - 1.94 void CompiledStaticCall::set(const StaticCallInfo& info) { 1.95 assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call"); 1.96 MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag); 1.97 @@ -618,19 +545,6 @@ 1.98 } 1.99 } 1.100 1.101 - 1.102 -void CompiledStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) { 1.103 - assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call"); 1.104 - // Reset stub 1.105 - address stub = static_stub->addr(); 1.106 - assert(stub!=NULL, "stub not found"); 1.107 - NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); // creation also verifies the object 1.108 - NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); 1.109 - method_holder->set_data(0); 1.110 - jump->set_jump_destination((address)-1); 1.111 -} 1.112 - 1.113 - 1.114 address CompiledStaticCall::find_stub() { 1.115 // Find reloc. information containing this call-site 1.116 RelocIterator iter((nmethod*)NULL, instruction_address()); 1.117 @@ -668,19 +582,16 @@ 1.118 || is_optimized() || is_megamorphic(), "sanity check"); 1.119 } 1.120 1.121 - 1.122 void CompiledIC::print() { 1.123 print_compiled_ic(); 1.124 tty->cr(); 1.125 } 1.126 1.127 - 1.128 void CompiledIC::print_compiled_ic() { 1.129 tty->print("Inline cache at " INTPTR_FORMAT ", calling %s " INTPTR_FORMAT " cached_value " INTPTR_FORMAT, 1.130 instruction_address(), is_call_to_interpreted() ? "interpreted " : "", ic_destination(), is_optimized() ? NULL : cached_value()); 1.131 } 1.132 1.133 - 1.134 void CompiledStaticCall::print() { 1.135 tty->print("static call at " INTPTR_FORMAT " -> ", instruction_address()); 1.136 if (is_clean()) { 1.137 @@ -693,21 +604,4 @@ 1.138 tty->cr(); 1.139 } 1.140 1.141 -void CompiledStaticCall::verify() { 1.142 - // Verify call 1.143 - NativeCall::verify(); 1.144 - if (os::is_MP()) { 1.145 - verify_alignment(); 1.146 - } 1.147 - 1.148 - // Verify stub 1.149 - address stub = find_stub(); 1.150 - assert(stub != NULL, "no stub found for static call"); 1.151 - NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); // creation also verifies the object 1.152 - NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); 1.153 - 1.154 - // Verify state 1.155 - assert(is_clean() || is_call_to_compiled() || is_call_to_interpreted(), "sanity check"); 1.156 -} 1.157 - 1.158 -#endif 1.159 +#endif // !PRODUCT