# HG changeset patch # User Christian Wirth # Date 1402083416 -7200 # Node ID f59498d6e8b12f4df322df91b1a9888b2f6540a0 # Parent 87414e322d454c1f2e8939aee3fca2cef64b559e# Parent 03eda0a202e9e78db0b5aaba912ca312ea2e2543 Merged diff -r 03eda0a202e9 -r f59498d6e8b1 graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java --- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Fri Jun 06 11:06:42 2014 -0700 +++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Fri Jun 06 21:36:56 2014 +0200 @@ -246,9 +246,7 @@ @SlowPath public Iterable getStackTrace() { - if (stackIntrospection == null) { - stackIntrospection = Graal.getRequiredCapability(StackIntrospection.class); - } + initStackIntrospection(); final Iterator frames = stackIntrospection.getStackTrace(anyFrameMethod, anyFrameMethod, 1).iterator(); class FrameIterator implements Iterator { @@ -276,10 +274,15 @@ }; } - public FrameInstance getCurrentFrame() { + private void initStackIntrospection() { if (stackIntrospection == null) { stackIntrospection = Graal.getRequiredCapability(StackIntrospection.class); } + } + + @SlowPath + public FrameInstance getCurrentFrame() { + initStackIntrospection(); Iterator frames = stackIntrospection.getStackTrace(callTargetMethod, callTargetMethod, 0).iterator(); if (frames.hasNext()) { return new HotSpotFrameInstance.CallTargetFrame(frames.next(), true);