diff --git a/core/src/main/java/org/jruby/Ruby.java b/core/src/main/java/org/jruby/Ruby.java index 1adae4b0ebb..72d5614f413 100644 --- a/core/src/main/java/org/jruby/Ruby.java +++ b/core/src/main/java/org/jruby/Ruby.java @@ -841,8 +841,11 @@ public IRubyObject runInterpreter(ThreadContext context, Node rootNode, IRubyObj assert self == getTopSelf(); final JRubyTruffleInterface truffleContext = getTruffleContext(); Main.printTruffleTimeMetric("before-run"); - truffleContext.execute((RootNode) rootNode); - Main.printTruffleTimeMetric("after-run"); + try { + truffleContext.execute((RootNode) rootNode); + } finally { + Main.printTruffleTimeMetric("after-run"); + } return getNil(); } else { return interpreter.execute(this, rootNode, self); @@ -890,7 +893,7 @@ public JRubyTruffleInterface getTruffleContext() { } private JRubyTruffleInterface loadTruffle() { - Main.printTruffleTimeMetric("before-load-truffle-context"); + Main.printTruffleTimeMetric("before-load-context"); final Class clazz; @@ -909,7 +912,7 @@ private JRubyTruffleInterface loadTruffle() { throw new RuntimeException("Error while calling the constructor of Truffle's RubyContext", e); } - Main.printTruffleTimeMetric("after-load-truffle-context"); + Main.printTruffleTimeMetric("after-load-context"); return truffleContext; } diff --git a/truffle/src/main/java/org/jruby/truffle/core/CoreLibrary.java b/truffle/src/main/java/org/jruby/truffle/core/CoreLibrary.java index a4a03e7389a..866e03ac38a 100644 --- a/truffle/src/main/java/org/jruby/truffle/core/CoreLibrary.java +++ b/truffle/src/main/java/org/jruby/truffle/core/CoreLibrary.java @@ -758,7 +758,7 @@ public void initializeAfterMethodsAdded() { // Load Ruby core try { - Main.printTruffleTimeMetric("before-load-truffle-core"); + Main.printTruffleTimeMetric("before-load-core"); state = State.LOADING_RUBY_CORE; try { @@ -767,7 +767,7 @@ public void initializeAfterMethodsAdded() { throw new RuntimeException(e); } - Main.printTruffleTimeMetric("after-load-truffle-core"); + Main.printTruffleTimeMetric("after-load-core"); } catch (RaiseException e) { final Object rubyException = e.getRubyException(); BacktraceFormatter.createDefaultFormatter(getContext()).printBacktrace(context, (DynamicObject) rubyException, Layouts.EXCEPTION.getBacktrace((DynamicObject) rubyException));