src/share/vm/opto/idealGraphPrinter.hpp

Fri, 11 Mar 2011 07:50:51 -0800

author
kvn
date
Fri, 11 Mar 2011 07:50:51 -0800
changeset 2636
83f08886981c
parent 2314
f95d63e2154a
child 2685
1927db75dd85
permissions
-rw-r--r--

7026631: field _klass is incorrectly set for dual type of TypeAryPtr::OOPS
Summary: add missing check this->dual() != TypeAryPtr::OOPS into TypeAryPtr::klass().
Reviewed-by: never

duke@435 1 /*
stefank@2314 2 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
duke@435 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 *
duke@435 5 * This code is free software; you can redistribute it and/or modify it
duke@435 6 * under the terms of the GNU General Public License version 2 only, as
duke@435 7 * published by the Free Software Foundation.
duke@435 8 *
duke@435 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 * accompanied this code).
duke@435 14 *
duke@435 15 * You should have received a copy of the GNU General Public License version
duke@435 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
duke@435 22 *
duke@435 23 */
duke@435 24
stefank@2314 25 #ifndef SHARE_VM_OPTO_IDEALGRAPHPRINTER_HPP
stefank@2314 26 #define SHARE_VM_OPTO_IDEALGRAPHPRINTER_HPP
stefank@2314 27
stefank@2314 28 #include "libadt/dict.hpp"
stefank@2314 29 #include "libadt/vectset.hpp"
stefank@2314 30 #include "utilities/growableArray.hpp"
stefank@2314 31 #include "utilities/ostream.hpp"
stefank@2314 32 #include "utilities/xmlstream.hpp"
stefank@2314 33
duke@435 34 #ifndef PRODUCT
duke@435 35
duke@435 36 class Compile;
duke@435 37 class PhaseIFG;
duke@435 38 class PhaseChaitin;
duke@435 39 class Matcher;
duke@435 40 class Node;
duke@435 41 class InlineTree;
duke@435 42 class ciMethod;
duke@435 43
duke@435 44 class IdealGraphPrinter
duke@435 45 {
duke@435 46 private:
duke@435 47
duke@435 48 enum State
duke@435 49 {
duke@435 50 Invalid,
duke@435 51 Valid,
duke@435 52 New
duke@435 53 };
duke@435 54
duke@435 55 private:
duke@435 56
duke@435 57 static const char *INDENT;
duke@435 58 static const char *TOP_ELEMENT;
duke@435 59 static const char *GROUP_ELEMENT;
duke@435 60 static const char *GRAPH_ELEMENT;
duke@435 61 static const char *PROPERTIES_ELEMENT;
duke@435 62 static const char *EDGES_ELEMENT;
duke@435 63 static const char *PROPERTY_ELEMENT;
duke@435 64 static const char *EDGE_ELEMENT;
duke@435 65 static const char *NODE_ELEMENT;
duke@435 66 static const char *NODES_ELEMENT;
duke@435 67 static const char *CONTROL_FLOW_ELEMENT;
duke@435 68 static const char *REMOVE_EDGE_ELEMENT;
duke@435 69 static const char *REMOVE_NODE_ELEMENT;
duke@435 70 static const char *METHOD_NAME_PROPERTY;
duke@435 71 static const char *BLOCK_NAME_PROPERTY;
duke@435 72 static const char *BLOCK_DOMINATOR_PROPERTY;
duke@435 73 static const char *BLOCK_ELEMENT;
duke@435 74 static const char *SUCCESSORS_ELEMENT;
duke@435 75 static const char *SUCCESSOR_ELEMENT;
duke@435 76 static const char *METHOD_IS_PUBLIC_PROPERTY;
duke@435 77 static const char *METHOD_IS_STATIC_PROPERTY;
duke@435 78 static const char *TRUE_VALUE;
duke@435 79 static const char *NODE_NAME_PROPERTY;
duke@435 80 static const char *EDGE_NAME_PROPERTY;
duke@435 81 static const char *NODE_ID_PROPERTY;
duke@435 82 static const char *FROM_PROPERTY;
duke@435 83 static const char *TO_PROPERTY;
duke@435 84 static const char *PROPERTY_NAME_PROPERTY;
duke@435 85 static const char *GRAPH_NAME_PROPERTY;
duke@435 86 static const char *INDEX_PROPERTY;
duke@435 87 static const char *METHOD_ELEMENT;
duke@435 88 static const char *INLINE_ELEMENT;
duke@435 89 static const char *BYTECODES_ELEMENT;
duke@435 90 static const char *METHOD_BCI_PROPERTY;
duke@435 91 static const char *METHOD_SHORT_NAME_PROPERTY;
duke@435 92 static const char *ASSEMBLY_ELEMENT;
duke@435 93
never@657 94 elapsedTimer _walk_time;
never@657 95 elapsedTimer _output_time;
never@657 96 elapsedTimer _build_blocks_time;
duke@435 97
duke@435 98 static int _file_count;
duke@435 99 networkStream *_stream;
never@657 100 xmlStream *_xml;
duke@435 101 outputStream *_output;
duke@435 102 ciMethod *_current_method;
duke@435 103 int _depth;
duke@435 104 char buffer[128];
duke@435 105 bool _should_send_method;
duke@435 106 PhaseChaitin* _chaitin;
duke@435 107 bool _traverse_outs;
never@657 108 Compile *C;
duke@435 109
duke@435 110 static void pre_node(Node* node, void *env);
duke@435 111 static void post_node(Node* node, void *env);
duke@435 112
duke@435 113 void print_indent();
duke@435 114 void print_method(ciMethod *method, int bci, InlineTree *tree);
duke@435 115 void print_inline_tree(InlineTree *tree);
never@657 116 void visit_node(Node *n, void *param);
never@657 117 void walk_nodes(Node *start, void *param);
never@657 118 void begin_elem(const char *s);
never@657 119 void end_elem();
never@657 120 void begin_head(const char *s);
never@657 121 void end_head();
never@657 122 void print_attr(const char *name, const char *val);
never@657 123 void print_attr(const char *name, intptr_t val);
never@657 124 void print_prop(const char *name, const char *val);
never@657 125 void print_prop(const char *name, int val);
never@657 126 void tail(const char *name);
never@657 127 void head(const char *name);
never@657 128 void text(const char *s);
never@657 129 intptr_t get_node_id(Node *n);
duke@435 130 IdealGraphPrinter();
duke@435 131 ~IdealGraphPrinter();
duke@435 132
duke@435 133 public:
duke@435 134
duke@435 135 static void clean_up();
duke@435 136 static IdealGraphPrinter *printer();
duke@435 137
duke@435 138 bool traverse_outs();
duke@435 139 void set_traverse_outs(bool b);
duke@435 140 outputStream *output();
duke@435 141 void print_inlining(Compile* compile);
duke@435 142 void begin_method(Compile* compile);
duke@435 143 void end_method();
duke@435 144 void print_method(Compile* compile, const char *name, int level=1, bool clear_nodes = false);
duke@435 145 void print(Compile* compile, const char *name, Node *root, int level=1, bool clear_nodes = false);
duke@435 146 void print_xml(const char *name);
duke@435 147
duke@435 148
duke@435 149 };
duke@435 150
duke@435 151 #endif
stefank@2314 152
stefank@2314 153 #endif // SHARE_VM_OPTO_IDEALGRAPHPRINTER_HPP

mercurial