From 72dd5a7a643cd31d074ceee12e2948dc08ad9f74 Mon Sep 17 00:00:00 2001 From: never Date: Fri, 27 Mar 2009 14:37:42 -0700 Subject: [PATCH] 6822333: _call_stub_compiled_return address handling in SA is broken causing jstack to hang occasionally Reviewed-by: kvn, twisti --- .../classes/sun/jvm/hotspot/runtime/StubRoutines.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java b/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java index be55ca524..fad351b49 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java +++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java @@ -46,12 +46,18 @@ public class StubRoutines { 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() { -- GitLab