src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java	Fri Jul  7 09:31:17 2017
--- new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java	Fri Jul  7 09:31:17 2017

*** 23,34 **** --- 23,33 ---- package org.graalvm.compiler.microbenchmarks.graal.util; import static org.graalvm.compiler.microbenchmarks.graal.util.GraalUtil.getGraph; import static org.graalvm.compiler.microbenchmarks.graal.util.GraalUtil.getMethodFromMethodSpec; ! import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.debug.DebugEnvironment; import org.graalvm.compiler.nodes.StructuredGraph; import org.openjdk.jmh.annotations.Level; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State;
*** 44,62 **** --- 43,59 ---- public abstract class GraphState { @SuppressWarnings("try") public GraphState() { GraalState graal = new GraalState(); // Ensure a debug configuration for this thread is initialized DebugEnvironment.ensureInitialized(graal.options); + DebugContext debug = graal.debug; ResolvedJavaMethod method = graal.metaAccess.lookupJavaMethod(getMethodFromMethodSpec(getClass())); StructuredGraph structuredGraph = null; ! try (Debug.Scope s = Debug.scope("GraphState", method)) { ! try (DebugContext.Scope s = debug.scope("GraphState", method)) { structuredGraph = preprocessOriginal(getGraph(graal, method)); } catch (Throwable t) { ! Debug.handle(t); ! debug.handle(t); } this.originalGraph = structuredGraph; } protected StructuredGraph preprocessOriginal(StructuredGraph structuredGraph) {
*** 73,80 **** --- 70,77 ---- */ public StructuredGraph graph; @Setup(Level.Invocation) public void beforeInvocation() { ! graph = (StructuredGraph) originalGraph.copy(originalGraph.getDebug()); } }

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File