--- old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java 2017-07-07 09:29:39.000000000 -0700 +++ new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StaticInterfaceFieldTest.java 2017-07-07 09:29:39.000000000 -0700 @@ -23,19 +23,19 @@ package org.graalvm.compiler.core.test; import static org.graalvm.compiler.core.test.GraalCompilerTest.getInitialOptions; -import static org.graalvm.compiler.debug.DelegatingDebugConfig.Feature.INTERCEPT; import java.lang.reflect.Method; import org.graalvm.compiler.api.test.Graal; -import org.graalvm.compiler.debug.Debug; -import org.graalvm.compiler.debug.DebugConfigScope; -import org.graalvm.compiler.debug.DelegatingDebugConfig; +import org.graalvm.compiler.debug.DebugCloseable; +import org.graalvm.compiler.debug.DebugHandlersFactory; +import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.java.GraphBuilderPhase; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration; import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins; import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins; +import org.graalvm.compiler.options.OptionValues; import org.graalvm.compiler.phases.OptimisticOptimizations; import org.graalvm.compiler.phases.PhaseSuite; import org.graalvm.compiler.phases.VerifyPhase; @@ -90,11 +90,13 @@ final Method m = getMethod(clazz, methodName); ResolvedJavaMethod method = metaAccess.lookupJavaMethod(m); - StructuredGraph graph = new StructuredGraph.Builder(getInitialOptions()).method(method).build(); - try (DebugConfigScope s = Debug.setConfig(new DelegatingDebugConfig().disable(INTERCEPT)); Debug.Scope ds = Debug.scope("GraphBuilding", graph, method)) { + OptionValues options = getInitialOptions(); + DebugContext debug = DebugContext.create(options, DebugHandlersFactory.LOADER); + StructuredGraph graph = new StructuredGraph.Builder(options, debug).method(method).build(); + try (DebugCloseable s = debug.disableIntercept(); DebugContext.Scope ds = debug.scope("GraphBuilding", graph, method)) { graphBuilderSuite.apply(graph, context); } catch (Throwable e) { - throw Debug.handle(e); + throw debug.handle(e); } } }