# HG changeset patch # User Doug Simon # Date 1395243847 -3600 # Node ID a0baf4eeb01806132e13ff34c8d371d6fac6c38e # Parent c03d4de2344869c59bfc02b8926f14f2f7c9673b removed allocation for name of debug scope diff -r c03d4de23448 -r a0baf4eeb018 graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java --- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Wed Mar 19 16:31:35 2014 +0100 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Wed Mar 19 16:44:07 2014 +0100 @@ -130,7 +130,7 @@ @Before public void beforeTest() { assert debugScope == null; - debugScope = Debug.scope(getClass().getSimpleName()); + debugScope = Debug.scope(getClass()); } @After @@ -498,7 +498,7 @@ } private CompilationResult compileBaseline(ResolvedJavaMethod javaMethod) { - try (Scope bds = Debug.scope("compileBaseline")) { + try (Scope bds = Debug.scope("CompileBaseline")) { BaselineCompiler baselineCompiler = new BaselineCompiler(GraphBuilderConfiguration.getDefault(), providers.getMetaAccess()); baselineCompiler.generate(javaMethod, -1); return null; diff -r c03d4de23448 -r a0baf4eeb018 graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/ea/EATestBase.java --- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/ea/EATestBase.java Wed Mar 19 16:31:35 2014 +0100 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/ea/EATestBase.java Wed Mar 19 16:44:07 2014 +0100 @@ -149,7 +149,7 @@ protected void prepareGraph(String snippet, final boolean iterativeEscapeAnalysis) { ResolvedJavaMethod method = getMetaAccess().lookupJavaMethod(getMethod(snippet)); graph = new StructuredGraph(method); - try (Scope s = Debug.scope(getClass().getSimpleName(), graph, method, getCodeCache())) { + try (Scope s = Debug.scope(getClass(), graph, method, getCodeCache())) { new GraphBuilderPhase.Instance(getMetaAccess(), GraphBuilderConfiguration.getEagerDefault(), OptimisticOptimizations.ALL).apply(graph); Assumptions assumptions = new Assumptions(false); context = new HighTierContext(getProviders(), assumptions, null, getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL); diff -r c03d4de23448 -r a0baf4eeb018 graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java --- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java Wed Mar 19 16:31:35 2014 +0100 +++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java Wed Mar 19 16:44:07 2014 +0100 @@ -163,6 +163,16 @@ * } * * + * The {@code name} argument is subject to the following type based conversion before having + * {@link Object#toString()} called on it: + * + *
+     *     Type          | Conversion
+     * ------------------+-----------------
+     *  java.lang.Class  | arg.getSimpleName()
+     *                   |
+     * 
+ * * @param name the name of the new scope * @param context objects to be appended to the {@linkplain #context() current} debug context * @return the scope entered by this method which will be exited when its {@link Scope#close()} diff -r c03d4de23448 -r a0baf4eeb018 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java Wed Mar 19 16:31:35 2014 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java Wed Mar 19 16:44:07 2014 +0100 @@ -100,7 +100,7 @@ final StructuredGraph graph = new StructuredGraph(executeHelperMethod); - try (Scope s = Debug.scope("createGraph", graph)) { + try (Scope s = Debug.scope("CreateGraph", graph)) { new GraphBuilderPhase.Instance(providers.getMetaAccess(), config, TruffleCompilerImpl.Optimizations).apply(graph); // Replace thisNode with constant. diff -r c03d4de23448 -r a0baf4eeb018 graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsPhase.java --- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsPhase.java Wed Mar 19 16:31:35 2014 +0100 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsPhase.java Wed Mar 19 16:44:07 2014 +0100 @@ -22,6 +22,8 @@ */ package com.oracle.graal.virtual.phases.ea; +import static com.oracle.graal.debug.Debug.*; + import com.oracle.graal.debug.*; import com.oracle.graal.debug.Debug.Scope; import com.oracle.graal.graph.*; @@ -59,8 +61,7 @@ public boolean runAnalysis(final StructuredGraph graph, final PhaseContextT context) { boolean changed = false; for (int iteration = 0; iteration < maxIterations; iteration++) { - - try (Scope s = Debug.scope("iteration " + iteration)) { + try (Scope s = Debug.scope(isEnabled() ? "iteration " + iteration : null)) { SchedulePhase schedule = new SchedulePhase(); schedule.apply(graph, false); Closure closure = createEffectsClosure(context, schedule); diff -r c03d4de23448 -r a0baf4eeb018 graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/IterativeInliningPhase.java --- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/IterativeInliningPhase.java Wed Mar 19 16:31:35 2014 +0100 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/IterativeInliningPhase.java Wed Mar 19 16:44:07 2014 +0100 @@ -22,6 +22,7 @@ */ package com.oracle.graal.virtual.phases.ea; +import static com.oracle.graal.debug.Debug.*; import static com.oracle.graal.phases.GraalOptions.*; import java.util.*; @@ -54,7 +55,7 @@ private void runIterations(final StructuredGraph graph, final boolean simple, final HighTierContext context) { for (int iteration = 0; iteration < EscapeAnalysisIterations.getValue(); iteration++) { - try (Scope s = Debug.scope("iteration " + iteration)) { + try (Scope s = Debug.scope(isEnabled() ? "iteration " + iteration : null)) { boolean progress = false; PartialEscapePhase ea = new PartialEscapePhase(false, canonicalizer); boolean eaResult = ea.runAnalysis(graph, context);