diff graal/GraalCompiler/src/com/sun/c1x/debug/CFGPrinter.java @ 2623:b129b7da1397

Some fixes around LIRGenerator / frame state. New option C1X:TraceLIRGeneratorLevel
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Tue, 10 May 2011 14:34:03 +0200
parents 91d3952f7eb7
children b2c1e959be46
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/debug/CFGPrinter.java	Tue May 10 12:37:46 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/debug/CFGPrinter.java	Tue May 10 14:34:03 2011 +0200
@@ -202,14 +202,14 @@
      * @param block the block for which the frame state is to be printed
      */
     private void printState(BlockBegin block) {
-        begin("state");
+        begin("states");
 
         FrameState state = block.stateBefore();
         int stackSize = state.stackSize();
         if (stackSize > 0) {
             begin("stack");
             out.print("size ").println(stackSize);
-            out.print("bci ").println(state.bci);
+            out.print("method \"").print(CiUtil.toLocation(C1XCompilation.compilation().method, state.bci)).println('"');
 
             int i = 0;
             while (i < stackSize) {
@@ -231,7 +231,7 @@
         if (state.locksSize() > 0) {
             begin("locks");
             out.print("size ").println(state.locksSize());
-            out.print("bci ").println(state.bci);
+            out.print("method \"").print(CiUtil.toLocation(C1XCompilation.compilation().method, state.bci)).println('"');
 
             for (int i = 0; i < state.locksSize(); ++i) {
                 Value value = state.lockAt(i);
@@ -246,7 +246,7 @@
 
         begin("locals");
         out.print("size ").println(state.localsSize());
-        out.print("bci ").println(state.bci);
+        out.print("method \"").print(CiUtil.toLocation(C1XCompilation.compilation().method, state.bci)).println('"');
         int i = 0;
         while (i < state.localsSize()) {
             Value value = state.localAt(i);
@@ -263,7 +263,7 @@
             }
         }
         end("locals");
-        end("state");
+        end("states");
     }
 
     /**
@@ -275,7 +275,7 @@
         }
 
         StringBuilder buf = new StringBuilder();
-        buf.append("[bci: ").append(state.bci).append("]");
+        buf.append(CiUtil.toLocation(C1XCompilation.compilation().method, state.bci));
         buf.append('\n');
         if (state.stackSize() > 0) {
             int i = 0;