hotspot/src/share/vm/opto/node.cpp
changeset 22854 2787e48d6df9
parent 19708 64e8c91f5f3e
child 22872 b6902ee5bc8d
equal deleted inserted replaced
22853:308672304981 22854:2787e48d6df9
  1521 #endif
  1521 #endif
  1522 
  1522 
  1523 
  1523 
  1524 
  1524 
  1525 #ifndef PRODUCT
  1525 #ifndef PRODUCT
  1526 int Node::_in_dump_cnt = 0;
       
  1527 
  1526 
  1528 // -----------------------------Name-------------------------------------------
  1527 // -----------------------------Name-------------------------------------------
  1529 extern const char *NodeClassNames[];
  1528 extern const char *NodeClassNames[];
  1530 const char *Node::Name() const { return NodeClassNames[Opcode()]; }
  1529 const char *Node::Name() const { return NodeClassNames[Opcode()]; }
  1531 
  1530 
  1593 //------------------------------dump------------------------------------------
  1592 //------------------------------dump------------------------------------------
  1594 // Dump a Node
  1593 // Dump a Node
  1595 void Node::dump(const char* suffix, outputStream *st) const {
  1594 void Node::dump(const char* suffix, outputStream *st) const {
  1596   Compile* C = Compile::current();
  1595   Compile* C = Compile::current();
  1597   bool is_new = C->node_arena()->contains(this);
  1596   bool is_new = C->node_arena()->contains(this);
  1598   _in_dump_cnt++;
  1597   C->_in_dump_cnt++;
  1599   st->print("%c%d\t%s\t=== ", is_new ? ' ' : 'o', _idx, Name());
  1598   st->print("%c%d\t%s\t=== ", is_new ? ' ' : 'o', _idx, Name());
  1600 
  1599 
  1601   // Dump the required and precedence inputs
  1600   // Dump the required and precedence inputs
  1602   dump_req(st);
  1601   dump_req(st);
  1603   dump_prec(st);
  1602   dump_prec(st);
  1608 #ifdef ASSERT
  1607 #ifdef ASSERT
  1609     st->print("  [%d]",debug_idx());
  1608     st->print("  [%d]",debug_idx());
  1610     dump_orig(debug_orig(), st);
  1609     dump_orig(debug_orig(), st);
  1611 #endif
  1610 #endif
  1612     st->cr();
  1611     st->cr();
  1613     _in_dump_cnt--;
  1612     C->_in_dump_cnt--;
  1614     return;                     // don't process dead nodes
  1613     return;                     // don't process dead nodes
  1615   }
  1614   }
  1616 
  1615 
  1617   // Dump node-specific info
  1616   // Dump node-specific info
  1618   dump_spec(st);
  1617   dump_spec(st);
  1660         nn->jvms()->dump_spec(st);
  1659         nn->jvms()->dump_spec(st);
  1661       }
  1660       }
  1662     }
  1661     }
  1663   }
  1662   }
  1664   if (suffix) st->print(suffix);
  1663   if (suffix) st->print(suffix);
  1665   _in_dump_cnt--;
  1664   C->_in_dump_cnt--;
  1666 }
  1665 }
  1667 
  1666 
  1668 //------------------------------dump_req--------------------------------------
  1667 //------------------------------dump_req--------------------------------------
  1669 void Node::dump_req(outputStream *st) const {
  1668 void Node::dump_req(outputStream *st) const {
  1670   // Dump the required input edges
  1669   // Dump the required input edges