Mercurial > hg > truffle
annotate src/share/vm/opto/idealGraphPrinter.hpp @ 1721:413ad0331a0c
6977924: Changes for 6975078 produce build error with certain gcc versions
Summary: The changes introduced for 6975078 assign badHeapOopVal to the _allocation field in the ResourceObj class. In 32 bit linux builds with certain versions of gcc this assignment will be flagged as an error while compiling allocation.cpp. In 32 bit builds the constant value badHeapOopVal (which is cast to an intptr_t) is negative. The _allocation field is typed as an unsigned intptr_t and gcc catches this as an error.
Reviewed-by: jcoomes, ysr, phh
author | johnc |
---|---|
date | Wed, 18 Aug 2010 10:59:06 -0700 |
parents | c18cbe5936b8 |
children | f95d63e2154a |
rev | line source |
---|---|
0 | 1 /* |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
222
diff
changeset
|
2 * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. |
0 | 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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
222
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
222
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
222
diff
changeset
|
21 * questions. |
0 | 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 }; | |
45 | |
46 private: | |
47 | |
48 static const char *INDENT; | |
49 static const char *TOP_ELEMENT; | |
50 static const char *GROUP_ELEMENT; | |
51 static const char *GRAPH_ELEMENT; | |
52 static const char *PROPERTIES_ELEMENT; | |
53 static const char *EDGES_ELEMENT; | |
54 static const char *PROPERTY_ELEMENT; | |
55 static const char *EDGE_ELEMENT; | |
56 static const char *NODE_ELEMENT; | |
57 static const char *NODES_ELEMENT; | |
58 static const char *CONTROL_FLOW_ELEMENT; | |
59 static const char *REMOVE_EDGE_ELEMENT; | |
60 static const char *REMOVE_NODE_ELEMENT; | |
61 static const char *METHOD_NAME_PROPERTY; | |
62 static const char *BLOCK_NAME_PROPERTY; | |
63 static const char *BLOCK_DOMINATOR_PROPERTY; | |
64 static const char *BLOCK_ELEMENT; | |
65 static const char *SUCCESSORS_ELEMENT; | |
66 static const char *SUCCESSOR_ELEMENT; | |
67 static const char *METHOD_IS_PUBLIC_PROPERTY; | |
68 static const char *METHOD_IS_STATIC_PROPERTY; | |
69 static const char *TRUE_VALUE; | |
70 static const char *NODE_NAME_PROPERTY; | |
71 static const char *EDGE_NAME_PROPERTY; | |
72 static const char *NODE_ID_PROPERTY; | |
73 static const char *FROM_PROPERTY; | |
74 static const char *TO_PROPERTY; | |
75 static const char *PROPERTY_NAME_PROPERTY; | |
76 static const char *GRAPH_NAME_PROPERTY; | |
77 static const char *INDEX_PROPERTY; | |
78 static const char *METHOD_ELEMENT; | |
79 static const char *INLINE_ELEMENT; | |
80 static const char *BYTECODES_ELEMENT; | |
81 static const char *METHOD_BCI_PROPERTY; | |
82 static const char *METHOD_SHORT_NAME_PROPERTY; | |
83 static const char *ASSEMBLY_ELEMENT; | |
84 | |
222 | 85 elapsedTimer _walk_time; |
86 elapsedTimer _output_time; | |
87 elapsedTimer _build_blocks_time; | |
0 | 88 |
89 static int _file_count; | |
90 networkStream *_stream; | |
222 | 91 xmlStream *_xml; |
0 | 92 outputStream *_output; |
93 ciMethod *_current_method; | |
94 int _depth; | |
95 char buffer[128]; | |
96 bool _should_send_method; | |
97 PhaseChaitin* _chaitin; | |
98 bool _traverse_outs; | |
222 | 99 Compile *C; |
0 | 100 |
101 static void pre_node(Node* node, void *env); | |
102 static void post_node(Node* node, void *env); | |
103 | |
104 void print_indent(); | |
105 void print_method(ciMethod *method, int bci, InlineTree *tree); | |
106 void print_inline_tree(InlineTree *tree); | |
222 | 107 void visit_node(Node *n, void *param); |
108 void walk_nodes(Node *start, void *param); | |
109 void begin_elem(const char *s); | |
110 void end_elem(); | |
111 void begin_head(const char *s); | |
112 void end_head(); | |
113 void print_attr(const char *name, const char *val); | |
114 void print_attr(const char *name, intptr_t val); | |
115 void print_prop(const char *name, const char *val); | |
116 void print_prop(const char *name, int val); | |
117 void tail(const char *name); | |
118 void head(const char *name); | |
119 void text(const char *s); | |
120 intptr_t get_node_id(Node *n); | |
0 | 121 IdealGraphPrinter(); |
122 ~IdealGraphPrinter(); | |
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 |