hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/AllocatorTest.java
--- a/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/AllocatorTest.java Fri Jul 07 10:37:52 2017 +0200
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/AllocatorTest.java Fri Jul 07 09:40:47 2017 -0700
@@ -24,15 +24,8 @@
import java.util.HashSet;
-import jdk.vm.ci.code.Register;
-import jdk.vm.ci.code.ValueUtil;
-import jdk.vm.ci.meta.Value;
-
-import org.junit.Assert;
-
import org.graalvm.compiler.core.common.cfg.AbstractBlockBase;
-import org.graalvm.compiler.debug.Debug;
-import org.graalvm.compiler.debug.Debug.Scope;
+import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.lir.LIR;
import org.graalvm.compiler.lir.LIRInstruction;
import org.graalvm.compiler.lir.LIRValueUtil;
@@ -40,23 +33,29 @@
import org.graalvm.compiler.lir.ValueProcedure;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
+import org.junit.Assert;
+
+import jdk.vm.ci.code.Register;
+import jdk.vm.ci.code.ValueUtil;
+import jdk.vm.ci.meta.Value;
public class AllocatorTest extends BackendTest {
@SuppressWarnings("try")
protected void testAllocation(String snippet, final int expectedRegisters, final int expectedRegRegMoves, final int expectedSpillMoves) {
final StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
- try (Scope s = Debug.scope("AllocatorTest", graph, graph.method(), getCodeCache())) {
+ DebugContext debug = graph.getDebug();
+ try (DebugContext.Scope s = debug.scope("AllocatorTest", graph, graph.method(), getCodeCache())) {
final RegisterStats stats = new RegisterStats(getLIRGenerationResult(graph).getLIR());
- try (Scope s2 = Debug.scope("Assertions", stats.lir)) {
+ try (DebugContext.Scope s2 = debug.scope("Assertions", stats.lir)) {
Assert.assertEquals("register count", expectedRegisters, stats.registers.size());
Assert.assertEquals("reg-reg moves", expectedRegRegMoves, stats.regRegMoves);
Assert.assertEquals("spill moves", expectedSpillMoves, stats.spillMoves);
} catch (Throwable e) {
- throw Debug.handle(e);
+ throw debug.handle(e);
}
} catch (Throwable e) {
- throw Debug.handle(e);
+ throw debug.handle(e);
}
}