src/share/vm/c1/c1_CFGPrinter.cpp

changeset 2174
f02a8bbe6ed4
parent 1907
c18cbe5936b8
child 2314
f95d63e2154a
     1.1 --- a/src/share/vm/c1/c1_CFGPrinter.cpp	Wed Sep 22 23:51:03 2010 -0700
     1.2 +++ b/src/share/vm/c1/c1_CFGPrinter.cpp	Tue Dec 29 19:08:54 2009 +0100
     1.3 @@ -174,31 +174,6 @@
     1.4    int index;
     1.5    Value value;
     1.6  
     1.7 -  if (state->stack_size() > 0) {
     1.8 -    print_begin("stack");
     1.9 -    print("size %d", state->stack_size());
    1.10 -
    1.11 -    for_each_stack_value(state, index, value) {
    1.12 -      ip.print_phi(index, value, block);
    1.13 -      print_operand(value);
    1.14 -      output()->cr();
    1.15 -    }
    1.16 -
    1.17 -    print_end("stack");
    1.18 -  }
    1.19 -
    1.20 -  if (state->locks_size() > 0) {
    1.21 -    print_begin("locks");
    1.22 -    print("size %d", state->locks_size());
    1.23 -
    1.24 -    for_each_lock_value(state, index, value) {
    1.25 -      ip.print_phi(index, value, block);
    1.26 -      print_operand(value);
    1.27 -      output()->cr();
    1.28 -    }
    1.29 -    print_end("locks");
    1.30 -  }
    1.31 -
    1.32    for_each_state(state) {
    1.33      print_begin("locals");
    1.34      print("size %d", state->locals_size());
    1.35 @@ -210,6 +185,33 @@
    1.36        output()->cr();
    1.37      }
    1.38      print_end("locals");
    1.39 +
    1.40 +    if (state->stack_size() > 0) {
    1.41 +      print_begin("stack");
    1.42 +      print("size %d", state->stack_size());
    1.43 +      print("method \"%s\"", method_name(state->scope()->method()));
    1.44 +
    1.45 +      for_each_stack_value(state, index, value) {
    1.46 +        ip.print_phi(index, value, block);
    1.47 +        print_operand(value);
    1.48 +        output()->cr();
    1.49 +      }
    1.50 +
    1.51 +      print_end("stack");
    1.52 +    }
    1.53 +
    1.54 +    if (state->locks_size() > 0) {
    1.55 +      print_begin("locks");
    1.56 +      print("size %d", state->locks_size());
    1.57 +      print("method \"%s\"", method_name(state->scope()->method()));
    1.58 +
    1.59 +      for_each_lock_value(state, index, value) {
    1.60 +        ip.print_phi(index, value, block);
    1.61 +        print_operand(value);
    1.62 +        output()->cr();
    1.63 +      }
    1.64 +      print_end("locks");
    1.65 +    }
    1.66    }
    1.67  
    1.68    print_end("states");
    1.69 @@ -230,7 +232,8 @@
    1.70    if (instr->is_pinned()) {
    1.71      output()->put('.');
    1.72    }
    1.73 -  output()->print("%d %d ", instr->bci(), instr->use_count());
    1.74 +
    1.75 +  output()->print("%d %d ", instr->printable_bci(), instr->use_count());
    1.76  
    1.77    print_operand(instr);
    1.78  
    1.79 @@ -271,7 +274,7 @@
    1.80    print("name \"B%d\"", block->block_id());
    1.81  
    1.82    print("from_bci %d", block->bci());
    1.83 -  print("to_bci %d", (block->end() == NULL ? -1 : block->end()->bci()));
    1.84 +  print("to_bci %d", (block->end() == NULL ? -1 : block->end()->printable_bci()));
    1.85  
    1.86    output()->indent();
    1.87    output()->print("predecessors ");

mercurial