src/share/vm/code/relocInfo.cpp

Print this page
rev 2893 : 7121756: Improve C1 inlining policy by using profiling at call sites
Summary: profile based recompilation of methods with C1 with more inlining.
Reviewed-by:

@@ -909,11 +909,11 @@
   CompiledIC* icache = CompiledIC_at(this);
   icache->set_to_clean();
 }
 
 
-address opt_virtual_call_Relocation::static_stub() {
+address virtual_call_Relocation::static_stub() {
   // search for the static stub who points back to this static call
   address static_call_addr = addr();
   RelocIterator iter(code());
   while (iter.next()) {
     if (iter.type() == relocInfo::static_stub_type) {

@@ -923,10 +923,23 @@
     }
   }
   return NULL;
 }
 
+address opt_virtual_call_Relocation::static_stub() {
+  // search for the static stub who points back to this static call
+  address static_call_addr = addr();
+  RelocIterator iter(code());
+  while (iter.next()) {
+    if (iter.type() == relocInfo::static_stub_type) {
+      if (iter.static_stub_reloc()->static_call() == static_call_addr) {
+        return iter.addr();
+      }
+    }
+  }
+  return NULL;
+}
 
 void static_call_Relocation::clear_inline_cache() {
   // Safe call site info
   CompiledStaticCall* handler = compiledStaticCall_at(this);
   handler->set_to_clean();