src/share/vm/opto/idealGraphPrinter.hpp

Print this page


   1 /*
   2  * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 









  25 #ifndef PRODUCT
  26 
  27 class Compile;
  28 class PhaseIFG;
  29 class PhaseChaitin;
  30 class Matcher;
  31 class Node;
  32 class InlineTree;
  33 class ciMethod;
  34 
  35 class IdealGraphPrinter
  36 {
  37 private:
  38 
  39   enum State
  40   {
  41     Invalid,
  42     Valid,
  43     New
  44   };


 123 
 124 public:
 125 
 126   static void clean_up();
 127   static IdealGraphPrinter *printer();
 128 
 129   bool traverse_outs();
 130   void set_traverse_outs(bool b);
 131   outputStream *output();
 132   void print_inlining(Compile* compile);
 133   void begin_method(Compile* compile);
 134   void end_method();
 135   void print_method(Compile* compile, const char *name, int level=1, bool clear_nodes = false);
 136   void print(Compile* compile, const char *name, Node *root, int level=1, bool clear_nodes = false);
 137   void print_xml(const char *name);
 138 
 139 
 140 };
 141 
 142 #endif


   1 /*
   2  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_OPTO_IDEALGRAPHPRINTER_HPP
  26 #define SHARE_VM_OPTO_IDEALGRAPHPRINTER_HPP
  27 
  28 #include "libadt/dict.hpp"
  29 #include "libadt/vectset.hpp"
  30 #include "utilities/growableArray.hpp"
  31 #include "utilities/ostream.hpp"
  32 #include "utilities/xmlstream.hpp"
  33 
  34 #ifndef PRODUCT
  35 
  36 class Compile;
  37 class PhaseIFG;
  38 class PhaseChaitin;
  39 class Matcher;
  40 class Node;
  41 class InlineTree;
  42 class ciMethod;
  43 
  44 class IdealGraphPrinter
  45 {
  46 private:
  47 
  48   enum State
  49   {
  50     Invalid,
  51     Valid,
  52     New
  53   };


 132 
 133 public:
 134 
 135   static void clean_up();
 136   static IdealGraphPrinter *printer();
 137 
 138   bool traverse_outs();
 139   void set_traverse_outs(bool b);
 140   outputStream *output();
 141   void print_inlining(Compile* compile);
 142   void begin_method(Compile* compile);
 143   void end_method();
 144   void print_method(Compile* compile, const char *name, int level=1, bool clear_nodes = false);
 145   void print(Compile* compile, const char *name, Node *root, int level=1, bool clear_nodes = false);
 146   void print_xml(const char *name);
 147 
 148 
 149 };
 150 
 151 #endif
 152 
 153 #endif // SHARE_VM_OPTO_IDEALGRAPHPRINTER_HPP