annotate src/share/vm/compiler/methodLiveness.hpp @ 6862:8a5ea0a9ccc4

7127708: G1: change task num types from int to uint in concurrent mark Summary: Change the type of various task num fields, parameters etc to unsigned and rename them to be more consistent with the other collectors. Code changes were also reviewed by Vitaly Davidovich. Reviewed-by: johnc Contributed-by: Kaushik Srenevasan <kaushik@twitter.com>
author johnc
date Sat, 06 Oct 2012 01:17:44 -0700
parents f95d63e2154a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
2 * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 342
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 342
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: 342
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
25 #ifndef SHARE_VM_COMPILER_METHODLIVENESS_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26 #define SHARE_VM_COMPILER_METHODLIVENESS_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
27
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
28 #include "utilities/bitMap.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
29 #include "utilities/growableArray.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
30
0
a61af66fc99e Initial load
duke
parents:
diff changeset
31 class ciMethod;
a61af66fc99e Initial load
duke
parents:
diff changeset
32
a61af66fc99e Initial load
duke
parents:
diff changeset
33 class MethodLivenessResult : public BitMap {
a61af66fc99e Initial load
duke
parents:
diff changeset
34 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
35 bool _is_valid;
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37 public:
342
37f87013dfd8 6711316: Open source the Garbage-First garbage collector
ysr
parents: 0
diff changeset
38 MethodLivenessResult(BitMap::bm_word_t* map, idx_t size_in_bits)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
39 : BitMap(map, size_in_bits)
a61af66fc99e Initial load
duke
parents:
diff changeset
40 , _is_valid(false)
a61af66fc99e Initial load
duke
parents:
diff changeset
41 {}
a61af66fc99e Initial load
duke
parents:
diff changeset
42
a61af66fc99e Initial load
duke
parents:
diff changeset
43 MethodLivenessResult(idx_t size_in_bits)
a61af66fc99e Initial load
duke
parents:
diff changeset
44 : BitMap(size_in_bits)
a61af66fc99e Initial load
duke
parents:
diff changeset
45 , _is_valid(false)
a61af66fc99e Initial load
duke
parents:
diff changeset
46 {}
a61af66fc99e Initial load
duke
parents:
diff changeset
47
a61af66fc99e Initial load
duke
parents:
diff changeset
48 void set_is_valid() { _is_valid = true; }
a61af66fc99e Initial load
duke
parents:
diff changeset
49 bool is_valid() { return _is_valid; }
a61af66fc99e Initial load
duke
parents:
diff changeset
50 };
a61af66fc99e Initial load
duke
parents:
diff changeset
51
a61af66fc99e Initial load
duke
parents:
diff changeset
52 class MethodLiveness : public ResourceObj {
a61af66fc99e Initial load
duke
parents:
diff changeset
53 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
54 // The BasicBlock class is used to represent a basic block in the
a61af66fc99e Initial load
duke
parents:
diff changeset
55 // liveness analysis.
a61af66fc99e Initial load
duke
parents:
diff changeset
56 class BasicBlock : public ResourceObj {
a61af66fc99e Initial load
duke
parents:
diff changeset
57 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
58 // This class is only used by the MethodLiveness class.
a61af66fc99e Initial load
duke
parents:
diff changeset
59 friend class MethodLiveness;
a61af66fc99e Initial load
duke
parents:
diff changeset
60
a61af66fc99e Initial load
duke
parents:
diff changeset
61 // The analyzer which created this basic block.
a61af66fc99e Initial load
duke
parents:
diff changeset
62 MethodLiveness* _analyzer;
a61af66fc99e Initial load
duke
parents:
diff changeset
63
a61af66fc99e Initial load
duke
parents:
diff changeset
64 // The range of this basic block is [start_bci,limit_bci)
a61af66fc99e Initial load
duke
parents:
diff changeset
65 int _start_bci;
a61af66fc99e Initial load
duke
parents:
diff changeset
66 int _limit_bci;
a61af66fc99e Initial load
duke
parents:
diff changeset
67
a61af66fc99e Initial load
duke
parents:
diff changeset
68 // The liveness at the start of the block;
a61af66fc99e Initial load
duke
parents:
diff changeset
69 BitMap _entry;
a61af66fc99e Initial load
duke
parents:
diff changeset
70
a61af66fc99e Initial load
duke
parents:
diff changeset
71 // The summarized liveness effects of our direct successors reached
a61af66fc99e Initial load
duke
parents:
diff changeset
72 // by normal control flow
a61af66fc99e Initial load
duke
parents:
diff changeset
73 BitMap _normal_exit;
a61af66fc99e Initial load
duke
parents:
diff changeset
74
a61af66fc99e Initial load
duke
parents:
diff changeset
75 // The summarized liveness effects of our direct successors reached
a61af66fc99e Initial load
duke
parents:
diff changeset
76 // by exceptional control flow
a61af66fc99e Initial load
duke
parents:
diff changeset
77 BitMap _exception_exit;
a61af66fc99e Initial load
duke
parents:
diff changeset
78
a61af66fc99e Initial load
duke
parents:
diff changeset
79 // These members hold the results of the last call to
a61af66fc99e Initial load
duke
parents:
diff changeset
80 // compute_gen_kill_range(). _gen is the set of locals
a61af66fc99e Initial load
duke
parents:
diff changeset
81 // used before they are defined in the range. _kill is the
a61af66fc99e Initial load
duke
parents:
diff changeset
82 // set of locals defined before they are used.
a61af66fc99e Initial load
duke
parents:
diff changeset
83 BitMap _gen;
a61af66fc99e Initial load
duke
parents:
diff changeset
84 BitMap _kill;
a61af66fc99e Initial load
duke
parents:
diff changeset
85 int _last_bci;
a61af66fc99e Initial load
duke
parents:
diff changeset
86
a61af66fc99e Initial load
duke
parents:
diff changeset
87 // A list of all blocks which could come directly before this one
a61af66fc99e Initial load
duke
parents:
diff changeset
88 // in normal (non-exceptional) control flow. We propagate liveness
a61af66fc99e Initial load
duke
parents:
diff changeset
89 // information to these blocks.
a61af66fc99e Initial load
duke
parents:
diff changeset
90 GrowableArray<BasicBlock*>* _normal_predecessors;
a61af66fc99e Initial load
duke
parents:
diff changeset
91
a61af66fc99e Initial load
duke
parents:
diff changeset
92 // A list of all blocks which could come directly before this one
a61af66fc99e Initial load
duke
parents:
diff changeset
93 // in exceptional control flow.
a61af66fc99e Initial load
duke
parents:
diff changeset
94 GrowableArray<BasicBlock*>* _exception_predecessors;
a61af66fc99e Initial load
duke
parents:
diff changeset
95
a61af66fc99e Initial load
duke
parents:
diff changeset
96 // The following fields are used to manage a work list used in the
a61af66fc99e Initial load
duke
parents:
diff changeset
97 // dataflow.
a61af66fc99e Initial load
duke
parents:
diff changeset
98 BasicBlock *_next;
a61af66fc99e Initial load
duke
parents:
diff changeset
99 bool _on_work_list;
a61af66fc99e Initial load
duke
parents:
diff changeset
100
a61af66fc99e Initial load
duke
parents:
diff changeset
101 // Our successors call this method to merge liveness information into
a61af66fc99e Initial load
duke
parents:
diff changeset
102 // our _normal_exit member.
a61af66fc99e Initial load
duke
parents:
diff changeset
103 bool merge_normal(BitMap other);
a61af66fc99e Initial load
duke
parents:
diff changeset
104
a61af66fc99e Initial load
duke
parents:
diff changeset
105 // Our successors call this method to merge liveness information into
a61af66fc99e Initial load
duke
parents:
diff changeset
106 // our _exception_exit member.
a61af66fc99e Initial load
duke
parents:
diff changeset
107 bool merge_exception(BitMap other);
a61af66fc99e Initial load
duke
parents:
diff changeset
108
a61af66fc99e Initial load
duke
parents:
diff changeset
109 // This helper routine is used to help compute the gen/kill pair for
a61af66fc99e Initial load
duke
parents:
diff changeset
110 // the block. It is also used to answer queries.
a61af66fc99e Initial load
duke
parents:
diff changeset
111 void compute_gen_kill_range(ciBytecodeStream *bytes);
a61af66fc99e Initial load
duke
parents:
diff changeset
112
a61af66fc99e Initial load
duke
parents:
diff changeset
113 // Compute the gen/kill effect of a single instruction.
a61af66fc99e Initial load
duke
parents:
diff changeset
114 void compute_gen_kill_single(ciBytecodeStream *instruction);
a61af66fc99e Initial load
duke
parents:
diff changeset
115
a61af66fc99e Initial load
duke
parents:
diff changeset
116 // Helpers for compute_gen_kill_single.
a61af66fc99e Initial load
duke
parents:
diff changeset
117 void load_one(int local);
a61af66fc99e Initial load
duke
parents:
diff changeset
118 void load_two(int local);
a61af66fc99e Initial load
duke
parents:
diff changeset
119 void store_one(int local);
a61af66fc99e Initial load
duke
parents:
diff changeset
120 void store_two(int local);
a61af66fc99e Initial load
duke
parents:
diff changeset
121
a61af66fc99e Initial load
duke
parents:
diff changeset
122 BasicBlock(MethodLiveness *analyzer, int start, int limit);
a61af66fc99e Initial load
duke
parents:
diff changeset
123
a61af66fc99e Initial load
duke
parents:
diff changeset
124 // -- Accessors
a61af66fc99e Initial load
duke
parents:
diff changeset
125
a61af66fc99e Initial load
duke
parents:
diff changeset
126 int start_bci() const { return _start_bci; }
a61af66fc99e Initial load
duke
parents:
diff changeset
127
a61af66fc99e Initial load
duke
parents:
diff changeset
128 int limit_bci() const { return _limit_bci; }
a61af66fc99e Initial load
duke
parents:
diff changeset
129 void set_limit_bci(int limit) { _limit_bci = limit; }
a61af66fc99e Initial load
duke
parents:
diff changeset
130
a61af66fc99e Initial load
duke
parents:
diff changeset
131 BasicBlock *next() const { return _next; }
a61af66fc99e Initial load
duke
parents:
diff changeset
132 void set_next(BasicBlock *next) { _next = next; }
a61af66fc99e Initial load
duke
parents:
diff changeset
133
a61af66fc99e Initial load
duke
parents:
diff changeset
134 bool on_work_list() const { return _on_work_list; }
a61af66fc99e Initial load
duke
parents:
diff changeset
135 void set_on_work_list(bool val) { _on_work_list = val; }
a61af66fc99e Initial load
duke
parents:
diff changeset
136
a61af66fc99e Initial load
duke
parents:
diff changeset
137 // -- Flow graph construction.
a61af66fc99e Initial load
duke
parents:
diff changeset
138
a61af66fc99e Initial load
duke
parents:
diff changeset
139 // Add a basic block to our list of normal predecessors.
a61af66fc99e Initial load
duke
parents:
diff changeset
140 void add_normal_predecessor(BasicBlock *pred) {
a61af66fc99e Initial load
duke
parents:
diff changeset
141 _normal_predecessors->append_if_missing(pred);
a61af66fc99e Initial load
duke
parents:
diff changeset
142 }
a61af66fc99e Initial load
duke
parents:
diff changeset
143
a61af66fc99e Initial load
duke
parents:
diff changeset
144 // Add a basic block to our list of exceptional predecessors
a61af66fc99e Initial load
duke
parents:
diff changeset
145 void add_exception_predecessor(BasicBlock *pred) {
a61af66fc99e Initial load
duke
parents:
diff changeset
146 _exception_predecessors->append_if_missing(pred);
a61af66fc99e Initial load
duke
parents:
diff changeset
147 }
a61af66fc99e Initial load
duke
parents:
diff changeset
148
a61af66fc99e Initial load
duke
parents:
diff changeset
149 // Split the basic block at splitBci. This basic block
a61af66fc99e Initial load
duke
parents:
diff changeset
150 // becomes the second half. The first half is newly created.
a61af66fc99e Initial load
duke
parents:
diff changeset
151 BasicBlock *split(int splitBci);
a61af66fc99e Initial load
duke
parents:
diff changeset
152
a61af66fc99e Initial load
duke
parents:
diff changeset
153 // -- Dataflow.
a61af66fc99e Initial load
duke
parents:
diff changeset
154
a61af66fc99e Initial load
duke
parents:
diff changeset
155 void compute_gen_kill(ciMethod* method);
a61af66fc99e Initial load
duke
parents:
diff changeset
156
a61af66fc99e Initial load
duke
parents:
diff changeset
157 // Propagate changes from this basic block
a61af66fc99e Initial load
duke
parents:
diff changeset
158 void propagate(MethodLiveness *ml);
a61af66fc99e Initial load
duke
parents:
diff changeset
159
a61af66fc99e Initial load
duke
parents:
diff changeset
160 // -- Query.
a61af66fc99e Initial load
duke
parents:
diff changeset
161
a61af66fc99e Initial load
duke
parents:
diff changeset
162 MethodLivenessResult get_liveness_at(ciMethod* method, int bci);
a61af66fc99e Initial load
duke
parents:
diff changeset
163
a61af66fc99e Initial load
duke
parents:
diff changeset
164 // -- Debugging.
a61af66fc99e Initial load
duke
parents:
diff changeset
165
a61af66fc99e Initial load
duke
parents:
diff changeset
166 void print_on(outputStream *os) const PRODUCT_RETURN;
a61af66fc99e Initial load
duke
parents:
diff changeset
167
a61af66fc99e Initial load
duke
parents:
diff changeset
168 }; // End of MethodLiveness::BasicBlock
a61af66fc99e Initial load
duke
parents:
diff changeset
169
a61af66fc99e Initial load
duke
parents:
diff changeset
170 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
171 // The method we are analyzing.
a61af66fc99e Initial load
duke
parents:
diff changeset
172 ciMethod* _method;
a61af66fc99e Initial load
duke
parents:
diff changeset
173 ciMethod* method() const { return _method; }
a61af66fc99e Initial load
duke
parents:
diff changeset
174
a61af66fc99e Initial load
duke
parents:
diff changeset
175 // The arena for storing structures...
a61af66fc99e Initial load
duke
parents:
diff changeset
176 Arena* _arena;
a61af66fc99e Initial load
duke
parents:
diff changeset
177 Arena* arena() const { return _arena; }
a61af66fc99e Initial load
duke
parents:
diff changeset
178
a61af66fc99e Initial load
duke
parents:
diff changeset
179 // We cache the length of the method.
a61af66fc99e Initial load
duke
parents:
diff changeset
180 int _code_size;
a61af66fc99e Initial load
duke
parents:
diff changeset
181
a61af66fc99e Initial load
duke
parents:
diff changeset
182 // The size of a BitMap.
a61af66fc99e Initial load
duke
parents:
diff changeset
183 int _bit_map_size_bits;
a61af66fc99e Initial load
duke
parents:
diff changeset
184 int _bit_map_size_words;
a61af66fc99e Initial load
duke
parents:
diff changeset
185
a61af66fc99e Initial load
duke
parents:
diff changeset
186 // A list of all BasicBlocks.
a61af66fc99e Initial load
duke
parents:
diff changeset
187 BasicBlock **_block_list;
a61af66fc99e Initial load
duke
parents:
diff changeset
188
a61af66fc99e Initial load
duke
parents:
diff changeset
189 // number of blocks
a61af66fc99e Initial load
duke
parents:
diff changeset
190 int _block_count;
a61af66fc99e Initial load
duke
parents:
diff changeset
191
a61af66fc99e Initial load
duke
parents:
diff changeset
192 // Keeps track of bci->block mapping. One entry for each bci. Only block starts are
a61af66fc99e Initial load
duke
parents:
diff changeset
193 // recorded.
a61af66fc99e Initial load
duke
parents:
diff changeset
194 GrowableArray<BasicBlock*>* _block_map;
a61af66fc99e Initial load
duke
parents:
diff changeset
195
a61af66fc99e Initial load
duke
parents:
diff changeset
196 // Our work list.
a61af66fc99e Initial load
duke
parents:
diff changeset
197 BasicBlock *_work_list;
a61af66fc99e Initial load
duke
parents:
diff changeset
198
a61af66fc99e Initial load
duke
parents:
diff changeset
199 #ifdef COMPILER1
a61af66fc99e Initial load
duke
parents:
diff changeset
200 // bcis where blocks start are marked
a61af66fc99e Initial load
duke
parents:
diff changeset
201 BitMap _bci_block_start;
a61af66fc99e Initial load
duke
parents:
diff changeset
202 #endif // COMPILER1
a61af66fc99e Initial load
duke
parents:
diff changeset
203
a61af66fc99e Initial load
duke
parents:
diff changeset
204 // -- Graph construction & Analysis
a61af66fc99e Initial load
duke
parents:
diff changeset
205
a61af66fc99e Initial load
duke
parents:
diff changeset
206 // Compute ranges and predecessors for basic blocks.
a61af66fc99e Initial load
duke
parents:
diff changeset
207 void init_basic_blocks();
a61af66fc99e Initial load
duke
parents:
diff changeset
208
a61af66fc99e Initial load
duke
parents:
diff changeset
209 // Compute gen/kill information for all basic blocks.
a61af66fc99e Initial load
duke
parents:
diff changeset
210 void init_gen_kill();
a61af66fc99e Initial load
duke
parents:
diff changeset
211
a61af66fc99e Initial load
duke
parents:
diff changeset
212 // Perform the dataflow.
a61af66fc99e Initial load
duke
parents:
diff changeset
213 void propagate_liveness();
a61af66fc99e Initial load
duke
parents:
diff changeset
214
a61af66fc99e Initial load
duke
parents:
diff changeset
215 // The class MethodLiveness::BasicBlock needs special access to some
a61af66fc99e Initial load
duke
parents:
diff changeset
216 // of our members.
a61af66fc99e Initial load
duke
parents:
diff changeset
217 friend class MethodLiveness::BasicBlock;
a61af66fc99e Initial load
duke
parents:
diff changeset
218
a61af66fc99e Initial load
duke
parents:
diff changeset
219 // And accessors.
a61af66fc99e Initial load
duke
parents:
diff changeset
220 int bit_map_size_bits() const { return _bit_map_size_bits; }
a61af66fc99e Initial load
duke
parents:
diff changeset
221 int bit_map_size_words() const { return _bit_map_size_words; }
a61af66fc99e Initial load
duke
parents:
diff changeset
222
a61af66fc99e Initial load
duke
parents:
diff changeset
223 // Work list manipulation routines. Called internally by BasicBlock.
a61af66fc99e Initial load
duke
parents:
diff changeset
224 BasicBlock *work_list_get();
a61af66fc99e Initial load
duke
parents:
diff changeset
225 void work_list_add(BasicBlock *block);
a61af66fc99e Initial load
duke
parents:
diff changeset
226
a61af66fc99e Initial load
duke
parents:
diff changeset
227 // -- Timing and Statistics.
a61af66fc99e Initial load
duke
parents:
diff changeset
228
a61af66fc99e Initial load
duke
parents:
diff changeset
229
a61af66fc99e Initial load
duke
parents:
diff changeset
230 // Timers
a61af66fc99e Initial load
duke
parents:
diff changeset
231 static elapsedTimer _time_build_graph;
a61af66fc99e Initial load
duke
parents:
diff changeset
232 static elapsedTimer _time_gen_kill;
a61af66fc99e Initial load
duke
parents:
diff changeset
233 static elapsedTimer _time_flow;
a61af66fc99e Initial load
duke
parents:
diff changeset
234 static elapsedTimer _time_query;
a61af66fc99e Initial load
duke
parents:
diff changeset
235 static elapsedTimer _time_total;
a61af66fc99e Initial load
duke
parents:
diff changeset
236
a61af66fc99e Initial load
duke
parents:
diff changeset
237 #ifndef PRODUCT
a61af66fc99e Initial load
duke
parents:
diff changeset
238
a61af66fc99e Initial load
duke
parents:
diff changeset
239 // Counts
a61af66fc99e Initial load
duke
parents:
diff changeset
240 static long _total_bytes;
a61af66fc99e Initial load
duke
parents:
diff changeset
241 static int _total_methods;
a61af66fc99e Initial load
duke
parents:
diff changeset
242
a61af66fc99e Initial load
duke
parents:
diff changeset
243 static long _total_blocks;
a61af66fc99e Initial load
duke
parents:
diff changeset
244 static int _max_method_blocks;
a61af66fc99e Initial load
duke
parents:
diff changeset
245
a61af66fc99e Initial load
duke
parents:
diff changeset
246 static long _total_edges;
a61af66fc99e Initial load
duke
parents:
diff changeset
247 static int _max_block_edges;
a61af66fc99e Initial load
duke
parents:
diff changeset
248
a61af66fc99e Initial load
duke
parents:
diff changeset
249 static long _total_exc_edges;
a61af66fc99e Initial load
duke
parents:
diff changeset
250 static int _max_block_exc_edges;
a61af66fc99e Initial load
duke
parents:
diff changeset
251
a61af66fc99e Initial load
duke
parents:
diff changeset
252 static long _total_method_locals;
a61af66fc99e Initial load
duke
parents:
diff changeset
253 static int _max_method_locals;
a61af66fc99e Initial load
duke
parents:
diff changeset
254
a61af66fc99e Initial load
duke
parents:
diff changeset
255 static long _total_locals_queried;
a61af66fc99e Initial load
duke
parents:
diff changeset
256 static long _total_live_locals_queried;
a61af66fc99e Initial load
duke
parents:
diff changeset
257
a61af66fc99e Initial load
duke
parents:
diff changeset
258 static long _total_visits;
a61af66fc99e Initial load
duke
parents:
diff changeset
259
a61af66fc99e Initial load
duke
parents:
diff changeset
260 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
261
a61af66fc99e Initial load
duke
parents:
diff changeset
262 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
263 // Create a liveness analyzer for a method
a61af66fc99e Initial load
duke
parents:
diff changeset
264 MethodLiveness(Arena* arena, ciMethod* method);
a61af66fc99e Initial load
duke
parents:
diff changeset
265
a61af66fc99e Initial load
duke
parents:
diff changeset
266 // Compute liveness information for the method
a61af66fc99e Initial load
duke
parents:
diff changeset
267 void compute_liveness();
a61af66fc99e Initial load
duke
parents:
diff changeset
268
a61af66fc99e Initial load
duke
parents:
diff changeset
269 // Find out which locals are live at a specific bci.
a61af66fc99e Initial load
duke
parents:
diff changeset
270 MethodLivenessResult get_liveness_at(int bci);
a61af66fc99e Initial load
duke
parents:
diff changeset
271
a61af66fc99e Initial load
duke
parents:
diff changeset
272 #ifdef COMPILER1
a61af66fc99e Initial load
duke
parents:
diff changeset
273 const BitMap get_bci_block_start() const { return _bci_block_start; }
a61af66fc99e Initial load
duke
parents:
diff changeset
274 #endif // COMPILER1
a61af66fc99e Initial load
duke
parents:
diff changeset
275
a61af66fc99e Initial load
duke
parents:
diff changeset
276 static void print_times() PRODUCT_RETURN;
a61af66fc99e Initial load
duke
parents:
diff changeset
277 };
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
278
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
279 #endif // SHARE_VM_COMPILER_METHODLIVENESS_HPP