# HG changeset patch # User Christian Wirth # Date 1402060436 -7200 # Node ID 87414e322d454c1f2e8939aee3fca2cef64b559e # Parent 87e11e4c031f1f6865e89f4d01f874b404c7053d SlowPath a method in HotSpotTruffleRuntime diff -r 87e11e4c031f -r 87414e322d45 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:17:29 2014 +0200 +++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Fri Jun 06 15:13: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);