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
hotspot Cdiff src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/util/GraphState.java
Print this page
*** 23,34 ****
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.Debug;
! 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;
--- 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.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 ****
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);
!
ResolvedJavaMethod method = graal.metaAccess.lookupJavaMethod(getMethodFromMethodSpec(getClass()));
StructuredGraph structuredGraph = null;
! try (Debug.Scope s = Debug.scope("GraphState", method)) {
structuredGraph = preprocessOriginal(getGraph(graal, method));
} catch (Throwable t) {
! Debug.handle(t);
}
this.originalGraph = structuredGraph;
}
protected StructuredGraph preprocessOriginal(StructuredGraph structuredGraph) {
--- 43,59 ----
public abstract class GraphState {
@SuppressWarnings("try")
public GraphState() {
GraalState graal = new GraalState();
! DebugContext debug = graal.debug;
ResolvedJavaMethod method = graal.metaAccess.lookupJavaMethod(getMethodFromMethodSpec(getClass()));
StructuredGraph structuredGraph = null;
! try (DebugContext.Scope s = debug.scope("GraphState", method)) {
structuredGraph = preprocessOriginal(getGraph(graal, method));
} catch (Throwable t) {
! debug.handle(t);
}
this.originalGraph = structuredGraph;
}
protected StructuredGraph preprocessOriginal(StructuredGraph structuredGraph) {
*** 73,80 ****
*/
public StructuredGraph graph;
@Setup(Level.Invocation)
public void beforeInvocation() {
! graph = (StructuredGraph) originalGraph.copy();
}
}
--- 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