Mercurial > hg > truffle
annotate src/share/vm/opto/idealGraphPrinter.hpp @ 1994:6cd6d394f280
7001033: assert(gch->gc_cause() == GCCause::_scavenge_alot || !gch->incremental_collection_failed())
7002546: regression on SpecJbb2005 on 7b118 comparing to 7b117 on small heaps
Summary: Relaxed assertion checking related to incremental_collection_failed flag to allow for ExplicitGCInvokesConcurrent behaviour where we do not want a failing scavenge to bail to a stop-world collection. Parameterized incremental_collection_will_fail() so we can selectively use, or not use, as appropriate, the statistical prediction at specific use sites. This essentially reverts the scavenge bail-out logic to what it was prior to some recent changes that had inadvertently started using the statistical prediction which can be noisy in the presence of bursty loads. Added some associated verbose non-product debugging messages.
Reviewed-by: johnc, tonyp
author | ysr |
---|---|
date | Tue, 07 Dec 2010 21:55:53 -0800 |
parents | f95d63e2154a |
children | 1927db75dd85 |
rev | line source |
---|---|
0 | 1 /* |
1972 | 2 * Copyright (c) 2007, 2010, 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 | |
1972 | 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 | |
0 | 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 }; | |
54 | |
55 private: | |
56 | |
57 static const char *INDENT; | |
58 static const char *TOP_ELEMENT; | |
59 static const char *GROUP_ELEMENT; | |
60 static const char *GRAPH_ELEMENT; | |
61 static const char *PROPERTIES_ELEMENT; | |
62 static const char *EDGES_ELEMENT; | |
63 static const char *PROPERTY_ELEMENT; | |
64 static const char *EDGE_ELEMENT; | |
65 static const char *NODE_ELEMENT; | |
66 static const char *NODES_ELEMENT; | |
67 static const char *CONTROL_FLOW_ELEMENT; | |
68 static const char *REMOVE_EDGE_ELEMENT; | |
69 static const char *REMOVE_NODE_ELEMENT; | |
70 static const char *METHOD_NAME_PROPERTY; | |
71 static const char *BLOCK_NAME_PROPERTY; | |
72 static const char *BLOCK_DOMINATOR_PROPERTY; | |
73 static const char *BLOCK_ELEMENT; | |
74 static const char *SUCCESSORS_ELEMENT; | |
75 static const char *SUCCESSOR_ELEMENT; | |
76 static const char *METHOD_IS_PUBLIC_PROPERTY; | |
77 static const char *METHOD_IS_STATIC_PROPERTY; | |
78 static const char *TRUE_VALUE; | |
79 static const char *NODE_NAME_PROPERTY; | |
80 static const char *EDGE_NAME_PROPERTY; | |
81 static const char *NODE_ID_PROPERTY; | |
82 static const char *FROM_PROPERTY; | |
83 static const char *TO_PROPERTY; | |
84 static const char *PROPERTY_NAME_PROPERTY; | |
85 static const char *GRAPH_NAME_PROPERTY; | |
86 static const char *INDEX_PROPERTY; | |
87 static const char *METHOD_ELEMENT; | |
88 static const char *INLINE_ELEMENT; | |
89 static const char *BYTECODES_ELEMENT; | |
90 static const char *METHOD_BCI_PROPERTY; | |
91 static const char *METHOD_SHORT_NAME_PROPERTY; | |
92 static const char *ASSEMBLY_ELEMENT; | |
93 | |
222 | 94 elapsedTimer _walk_time; |
95 elapsedTimer _output_time; | |
96 elapsedTimer _build_blocks_time; | |
0 | 97 |
98 static int _file_count; | |
99 networkStream *_stream; | |
222 | 100 xmlStream *_xml; |
0 | 101 outputStream *_output; |
102 ciMethod *_current_method; | |
103 int _depth; | |
104 char buffer[128]; | |
105 bool _should_send_method; | |
106 PhaseChaitin* _chaitin; | |
107 bool _traverse_outs; | |
222 | 108 Compile *C; |
0 | 109 |
110 static void pre_node(Node* node, void *env); | |
111 static void post_node(Node* node, void *env); | |
112 | |
113 void print_indent(); | |
114 void print_method(ciMethod *method, int bci, InlineTree *tree); | |
115 void print_inline_tree(InlineTree *tree); | |
222 | 116 void visit_node(Node *n, void *param); |
117 void walk_nodes(Node *start, void *param); | |
118 void begin_elem(const char *s); | |
119 void end_elem(); | |
120 void begin_head(const char *s); | |
121 void end_head(); | |
122 void print_attr(const char *name, const char *val); | |
123 void print_attr(const char *name, intptr_t val); | |
124 void print_prop(const char *name, const char *val); | |
125 void print_prop(const char *name, int val); | |
126 void tail(const char *name); | |
127 void head(const char *name); | |
128 void text(const char *s); | |
129 intptr_t get_node_id(Node *n); | |
0 | 130 IdealGraphPrinter(); |
131 ~IdealGraphPrinter(); | |
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 | |
1972 | 152 |
153 #endif // SHARE_VM_OPTO_IDEALGRAPHPRINTER_HPP |