6822333: _call_stub_compiled_return address handling in SA is broken causing jstack to hang occasionally
authornever
Fri, 27 Mar 2009 14:37:42 -0700
changeset 2341 caadacf15616
parent 2340 cb47f8209cd8
child 2342 9a1260c3679d
6822333: _call_stub_compiled_return address handling in SA is broken causing jstack to hang occasionally Reviewed-by: kvn, twisti
hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java	Thu Mar 26 15:04:55 2009 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java	Fri Mar 27 14:37:42 2009 -0700
@@ -46,12 +46,18 @@
     Type type = db.lookupType("StubRoutines");
 
     callStubReturnAddressField = type.getAddressField("_call_stub_return_address");
-    // Only some platforms have specif return from compiled to call_stub
+    // Only some platforms have specific return from compiled to call_stub
     try {
-      callStubCompiledReturnAddressField = type.getAddressField("_call_stub_compiled_return");
+      type = db.lookupType("StubRoutines::x86");
+      if (type != null) {
+        callStubCompiledReturnAddressField = type.getAddressField("_call_stub_compiled_return");
+      }
     } catch (RuntimeException re) {
       callStubCompiledReturnAddressField = null;
     }
+    if (callStubCompiledReturnAddressField == null && VM.getVM().getCPU().equals("x86")) {
+      throw new InternalError("Missing definition for _call_stub_compiled_return");
+    }
   }
 
   public StubRoutines() {