author | mdoerr |
Tue, 05 Nov 2019 11:53:46 +0100 | |
changeset 58932 | 8623f75be895 |
parent 58722 | cba8afa5cfed |
permissions | -rw-r--r-- |
1 | 1 |
/* |
58722
cba8afa5cfed
8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents:
51996
diff
changeset
|
2 |
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. |
1 | 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 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3908
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3908
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3908
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#include "precompiled.hpp" |
26 |
#include "c1/c1_InstructionPrinter.hpp" |
|
27 |
#include "c1/c1_ValueStack.hpp" |
|
28 |
#include "ci/ciArray.hpp" |
|
29 |
#include "ci/ciInstance.hpp" |
|
30 |
#include "ci/ciObject.hpp" |
|
1 | 31 |
|
32 |
||
33 |
#ifndef PRODUCT |
|
34 |
||
35 |
const char* InstructionPrinter::basic_type_name(BasicType type) { |
|
58722
cba8afa5cfed
8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents:
51996
diff
changeset
|
36 |
const char* n = type2name(type); |
cba8afa5cfed
8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents:
51996
diff
changeset
|
37 |
if (n == NULL || type > T_VOID) { |
cba8afa5cfed
8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents:
51996
diff
changeset
|
38 |
return "???"; |
1 | 39 |
} |
58722
cba8afa5cfed
8231844: Enhance type signature characters in classfile_constants.h and improve the JVM to use type signature characters more consistently
lfoltan
parents:
51996
diff
changeset
|
40 |
return n; |
1 | 41 |
} |
42 |
||
43 |
||
44 |
const char* InstructionPrinter::cond_name(If::Condition cond) { |
|
45 |
switch (cond) { |
|
46 |
case If::eql: return "=="; |
|
47 |
case If::neq: return "!="; |
|
48 |
case If::lss: return "<"; |
|
49 |
case If::leq: return "<="; |
|
50 |
case If::gtr: return ">"; |
|
51 |
case If::geq: return ">="; |
|
16611 | 52 |
case If::aeq: return "|>=|"; |
53 |
case If::beq: return "|<=|"; |
|
46630
75aa3e39d02c
8182299: Enable disabled clang warnings, build on OSX 10 + Xcode 8
jwilhelm
parents:
28954
diff
changeset
|
54 |
default: |
75aa3e39d02c
8182299: Enable disabled clang warnings, build on OSX 10 + Xcode 8
jwilhelm
parents:
28954
diff
changeset
|
55 |
ShouldNotReachHere(); |
75aa3e39d02c
8182299: Enable disabled clang warnings, build on OSX 10 + Xcode 8
jwilhelm
parents:
28954
diff
changeset
|
56 |
return NULL; |
1 | 57 |
} |
58 |
} |
|
59 |
||
60 |
||
61 |
const char* InstructionPrinter::op_name(Bytecodes::Code op) { |
|
62 |
switch (op) { |
|
63 |
// arithmetic ops |
|
64 |
case Bytecodes::_iadd : // fall through |
|
65 |
case Bytecodes::_ladd : // fall through |
|
66 |
case Bytecodes::_fadd : // fall through |
|
67 |
case Bytecodes::_dadd : return "+"; |
|
68 |
case Bytecodes::_isub : // fall through |
|
69 |
case Bytecodes::_lsub : // fall through |
|
70 |
case Bytecodes::_fsub : // fall through |
|
71 |
case Bytecodes::_dsub : return "-"; |
|
72 |
case Bytecodes::_imul : // fall through |
|
73 |
case Bytecodes::_lmul : // fall through |
|
74 |
case Bytecodes::_fmul : // fall through |
|
75 |
case Bytecodes::_dmul : return "*"; |
|
76 |
case Bytecodes::_idiv : // fall through |
|
77 |
case Bytecodes::_ldiv : // fall through |
|
78 |
case Bytecodes::_fdiv : // fall through |
|
79 |
case Bytecodes::_ddiv : return "/"; |
|
80 |
case Bytecodes::_irem : // fall through |
|
81 |
case Bytecodes::_lrem : // fall through |
|
82 |
case Bytecodes::_frem : // fall through |
|
83 |
case Bytecodes::_drem : return "%"; |
|
84 |
// shift ops |
|
85 |
case Bytecodes::_ishl : // fall through |
|
86 |
case Bytecodes::_lshl : return "<<"; |
|
87 |
case Bytecodes::_ishr : // fall through |
|
88 |
case Bytecodes::_lshr : return ">>"; |
|
89 |
case Bytecodes::_iushr: // fall through |
|
90 |
case Bytecodes::_lushr: return ">>>"; |
|
91 |
// logic ops |
|
92 |
case Bytecodes::_iand : // fall through |
|
93 |
case Bytecodes::_land : return "&"; |
|
94 |
case Bytecodes::_ior : // fall through |
|
95 |
case Bytecodes::_lor : return "|"; |
|
96 |
case Bytecodes::_ixor : // fall through |
|
97 |
case Bytecodes::_lxor : return "^"; |
|
46630
75aa3e39d02c
8182299: Enable disabled clang warnings, build on OSX 10 + Xcode 8
jwilhelm
parents:
28954
diff
changeset
|
98 |
default : return Bytecodes::name(op); |
1 | 99 |
} |
100 |
} |
|
101 |
||
102 |
||
103 |
bool InstructionPrinter::is_illegal_phi(Value v) { |
|
104 |
Phi* phi = v ? v->as_Phi() : NULL; |
|
105 |
if (phi && phi->is_illegal()) { |
|
106 |
return true; |
|
107 |
} |
|
108 |
return false; |
|
109 |
} |
|
110 |
||
111 |
||
112 |
bool InstructionPrinter::is_phi_of_block(Value v, BlockBegin* b) { |
|
113 |
Phi* phi = v ? v->as_Phi() : NULL; |
|
114 |
return phi && phi->block() == b; |
|
115 |
} |
|
116 |
||
117 |
||
118 |
void InstructionPrinter::print_klass(ciKlass* klass) { |
|
119 |
klass->name()->print_symbol_on(output()); |
|
120 |
} |
|
121 |
||
122 |
||
123 |
void InstructionPrinter::print_object(Value obj) { |
|
124 |
ValueType* type = obj->type(); |
|
125 |
if (type->as_ObjectConstant() != NULL) { |
|
126 |
ciObject* value = type->as_ObjectConstant()->value(); |
|
127 |
if (value->is_null_object()) { |
|
128 |
output()->print("null"); |
|
129 |
} else if (!value->is_loaded()) { |
|
24424
2658d7834c6e
8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents:
20709
diff
changeset
|
130 |
output()->print("<unloaded object " INTPTR_FORMAT ">", p2i(value)); |
1 | 131 |
} else { |
24424
2658d7834c6e
8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents:
20709
diff
changeset
|
132 |
output()->print("<object " INTPTR_FORMAT " klass=", p2i(value->constant_encoding())); |
13391
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
11886
diff
changeset
|
133 |
print_klass(value->klass()); |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
11886
diff
changeset
|
134 |
output()->print(">"); |
1 | 135 |
} |
136 |
} else if (type->as_InstanceConstant() != NULL) { |
|
9629
1f4dc6af5ad8
7042153: guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp
iveresov
parents:
8065
diff
changeset
|
137 |
ciInstance* value = type->as_InstanceConstant()->value(); |
1f4dc6af5ad8
7042153: guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp
iveresov
parents:
8065
diff
changeset
|
138 |
if (value->is_loaded()) { |
24424
2658d7834c6e
8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents:
20709
diff
changeset
|
139 |
output()->print("<instance " INTPTR_FORMAT " klass=", p2i(value->constant_encoding())); |
13391
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
11886
diff
changeset
|
140 |
print_klass(value->klass()); |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
11886
diff
changeset
|
141 |
output()->print(">"); |
9629
1f4dc6af5ad8
7042153: guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp
iveresov
parents:
8065
diff
changeset
|
142 |
} else { |
24424
2658d7834c6e
8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents:
20709
diff
changeset
|
143 |
output()->print("<unloaded instance " INTPTR_FORMAT ">", p2i(value)); |
9629
1f4dc6af5ad8
7042153: guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp
iveresov
parents:
8065
diff
changeset
|
144 |
} |
1 | 145 |
} else if (type->as_ArrayConstant() != NULL) { |
24424
2658d7834c6e
8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents:
20709
diff
changeset
|
146 |
output()->print("<array " INTPTR_FORMAT ">", p2i(type->as_ArrayConstant()->value()->constant_encoding())); |
1 | 147 |
} else if (type->as_ClassConstant() != NULL) { |
148 |
ciInstanceKlass* klass = type->as_ClassConstant()->value(); |
|
149 |
if (!klass->is_loaded()) { |
|
150 |
output()->print("<unloaded> "); |
|
151 |
} |
|
152 |
output()->print("class "); |
|
153 |
print_klass(klass); |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
154 |
} else if (type->as_MethodConstant() != NULL) { |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
155 |
ciMethod* m = type->as_MethodConstant()->value(); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
156 |
output()->print("<method %s.%s>", m->holder()->name()->as_utf8(), m->name()->as_utf8()); |
1 | 157 |
} else { |
158 |
output()->print("???"); |
|
159 |
} |
|
160 |
} |
|
161 |
||
162 |
||
163 |
void InstructionPrinter::print_temp(Value value) { |
|
164 |
output()->print("%c%d", value->type()->tchar(), value->id()); |
|
165 |
} |
|
166 |
||
167 |
||
168 |
void InstructionPrinter::print_field(AccessField* field) { |
|
169 |
print_value(field->obj()); |
|
170 |
output()->print("._%d", field->offset()); |
|
171 |
} |
|
172 |
||
173 |
||
174 |
void InstructionPrinter::print_indexed(AccessIndexed* indexed) { |
|
175 |
print_value(indexed->array()); |
|
176 |
output()->put('['); |
|
177 |
print_value(indexed->index()); |
|
178 |
output()->put(']'); |
|
16611 | 179 |
if (indexed->length() != NULL) { |
180 |
output()->put('('); |
|
181 |
print_value(indexed->length()); |
|
182 |
output()->put(')'); |
|
183 |
} |
|
1 | 184 |
} |
185 |
||
186 |
||
187 |
void InstructionPrinter::print_monitor(AccessMonitor* monitor) { |
|
188 |
output()->print("monitor[%d](", monitor->monitor_no()); |
|
189 |
print_value(monitor->obj()); |
|
190 |
output()->put(')'); |
|
191 |
} |
|
192 |
||
193 |
||
194 |
void InstructionPrinter::print_op2(Op2* instr) { |
|
195 |
print_value(instr->x()); |
|
196 |
output()->print(" %s ", op_name(instr->op())); |
|
197 |
print_value(instr->y()); |
|
198 |
} |
|
199 |
||
200 |
||
201 |
void InstructionPrinter::print_value(Value value) { |
|
202 |
if (value == NULL) { |
|
203 |
output()->print("NULL"); |
|
204 |
} else { |
|
205 |
print_temp(value); |
|
206 |
} |
|
207 |
} |
|
208 |
||
209 |
||
210 |
void InstructionPrinter::print_instr(Instruction* instr) { |
|
211 |
instr->visit(this); |
|
212 |
} |
|
213 |
||
214 |
||
215 |
void InstructionPrinter::print_stack(ValueStack* stack) { |
|
216 |
int start_position = output()->position(); |
|
217 |
if (stack->stack_is_empty()) { |
|
218 |
output()->print("empty stack"); |
|
219 |
} else { |
|
220 |
output()->print("stack ["); |
|
221 |
for (int i = 0; i < stack->stack_size();) { |
|
222 |
if (i > 0) output()->print(", "); |
|
223 |
output()->print("%d:", i); |
|
224 |
Value value = stack->stack_at_inc(i); |
|
225 |
print_value(value); |
|
226 |
Phi* phi = value->as_Phi(); |
|
227 |
if (phi != NULL) { |
|
228 |
if (phi->operand()->is_valid()) { |
|
229 |
output()->print(" "); |
|
230 |
phi->operand()->print(output()); |
|
231 |
} |
|
232 |
} |
|
233 |
} |
|
234 |
output()->put(']'); |
|
235 |
} |
|
236 |
if (!stack->no_active_locks()) { |
|
237 |
// print out the lines on the line below this |
|
238 |
// one at the same indentation level. |
|
239 |
output()->cr(); |
|
240 |
fill_to(start_position, ' '); |
|
241 |
output()->print("locks ["); |
|
242 |
for (int i = i = 0; i < stack->locks_size(); i++) { |
|
243 |
Value t = stack->lock_at(i); |
|
244 |
if (i > 0) output()->print(", "); |
|
245 |
output()->print("%d:", i); |
|
246 |
if (t == NULL) { |
|
247 |
// synchronized methods push null on the lock stack |
|
248 |
output()->print("this"); |
|
249 |
} else { |
|
250 |
print_value(t); |
|
251 |
} |
|
252 |
} |
|
253 |
output()->print("]"); |
|
254 |
} |
|
255 |
} |
|
256 |
||
257 |
||
258 |
void InstructionPrinter::print_inline_level(BlockBegin* block) { |
|
259 |
output()->print_cr("inlining depth %d", block->scope()->level()); |
|
260 |
} |
|
261 |
||
262 |
||
263 |
void InstructionPrinter::print_unsafe_op(UnsafeOp* op, const char* name) { |
|
24424
2658d7834c6e
8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents:
20709
diff
changeset
|
264 |
output()->print("%s", name); |
1 | 265 |
output()->print(".("); |
266 |
} |
|
267 |
||
268 |
void InstructionPrinter::print_unsafe_raw_op(UnsafeRawOp* op, const char* name) { |
|
269 |
print_unsafe_op(op, name); |
|
270 |
output()->print("base "); |
|
271 |
print_value(op->base()); |
|
272 |
if (op->has_index()) { |
|
273 |
output()->print(", index "); print_value(op->index()); |
|
274 |
output()->print(", log2_scale %d", op->log2_scale()); |
|
275 |
} |
|
276 |
} |
|
277 |
||
278 |
||
279 |
void InstructionPrinter::print_unsafe_object_op(UnsafeObjectOp* op, const char* name) { |
|
280 |
print_unsafe_op(op, name); |
|
281 |
print_value(op->object()); |
|
282 |
output()->print(", "); |
|
283 |
print_value(op->offset()); |
|
284 |
} |
|
285 |
||
286 |
||
287 |
void InstructionPrinter::print_phi(int i, Value v, BlockBegin* b) { |
|
288 |
Phi* phi = v->as_Phi(); |
|
289 |
output()->print("%2d ", i); |
|
290 |
print_value(v); |
|
291 |
// print phi operands |
|
292 |
if (phi && phi->block() == b) { |
|
293 |
output()->print(" ["); |
|
294 |
for (int j = 0; j < phi->operand_count(); j ++) { |
|
295 |
output()->print(" "); |
|
296 |
Value opd = phi->operand_at(j); |
|
297 |
if (opd) print_value(opd); |
|
298 |
else output()->print("NULL"); |
|
299 |
} |
|
300 |
output()->print("] "); |
|
301 |
} |
|
302 |
print_alias(v); |
|
303 |
} |
|
304 |
||
305 |
||
306 |
void InstructionPrinter::print_alias(Value v) { |
|
307 |
if (v != v->subst()) { |
|
308 |
output()->print("alias "); print_value(v->subst()); |
|
309 |
} |
|
310 |
} |
|
311 |
||
312 |
||
313 |
void InstructionPrinter::fill_to(int pos, char filler) { |
|
314 |
while (output()->position() < pos) output()->put(filler); |
|
315 |
} |
|
316 |
||
317 |
||
318 |
void InstructionPrinter::print_head() { |
|
319 |
const char filler = '_'; |
|
320 |
fill_to(bci_pos , filler); output()->print("bci" ); |
|
321 |
fill_to(use_pos , filler); output()->print("use" ); |
|
322 |
fill_to(temp_pos , filler); output()->print("tid" ); |
|
323 |
fill_to(instr_pos, filler); output()->print("instr"); |
|
324 |
fill_to(end_pos , filler); |
|
325 |
output()->cr(); |
|
326 |
} |
|
327 |
||
328 |
||
329 |
void InstructionPrinter::print_line(Instruction* instr) { |
|
330 |
// print instruction data on one line |
|
331 |
if (instr->is_pinned()) output()->put('.'); |
|
6745 | 332 |
fill_to(bci_pos ); output()->print("%d", instr->printable_bci()); |
1 | 333 |
fill_to(use_pos ); output()->print("%d", instr->use_count()); |
334 |
fill_to(temp_pos ); print_temp(instr); |
|
335 |
fill_to(instr_pos); print_instr(instr); |
|
336 |
output()->cr(); |
|
337 |
// add a line for StateSplit instructions w/ non-empty stacks |
|
338 |
// (make it robust so we can print incomplete instructions) |
|
339 |
StateSplit* split = instr->as_StateSplit(); |
|
340 |
if (split != NULL && split->state() != NULL && !split->state()->stack_is_empty()) { |
|
341 |
fill_to(instr_pos); print_stack(split->state()); |
|
342 |
output()->cr(); |
|
343 |
} |
|
344 |
} |
|
345 |
||
346 |
||
347 |
void InstructionPrinter::do_Phi(Phi* x) { |
|
348 |
output()->print("phi function"); // make that more detailed later |
|
349 |
if (x->is_illegal()) |
|
350 |
output()->print(" (illegal)"); |
|
351 |
} |
|
352 |
||
353 |
||
354 |
void InstructionPrinter::do_Local(Local* x) { |
|
355 |
output()->print("local[index %d]", x->java_index()); |
|
356 |
} |
|
357 |
||
358 |
||
359 |
void InstructionPrinter::do_Constant(Constant* x) { |
|
360 |
ValueType* t = x->type(); |
|
361 |
switch (t->tag()) { |
|
362 |
case intTag : output()->print("%d" , t->as_IntConstant ()->value()); break; |
|
15228
e92acc84ade3
7102489: RFE: cleanup jlong typedef on __APPLE__and _LLP64 systems.
hseigel
parents:
13886
diff
changeset
|
363 |
case longTag : output()->print(JLONG_FORMAT, t->as_LongConstant()->value()); output()->print("L"); break; |
1 | 364 |
case floatTag : output()->print("%g" , t->as_FloatConstant ()->value()); break; |
365 |
case doubleTag : output()->print("%gD" , t->as_DoubleConstant()->value()); break; |
|
366 |
case objectTag : print_object(x); break; |
|
367 |
case addressTag: output()->print("bci:%d", t->as_AddressConstant()->value()); break; |
|
368 |
default : output()->print("???"); break; |
|
369 |
} |
|
370 |
} |
|
371 |
||
372 |
||
373 |
void InstructionPrinter::do_LoadField(LoadField* x) { |
|
374 |
print_field(x); |
|
375 |
output()->print(" (%c)", type2char(x->field()->type()->basic_type())); |
|
16611 | 376 |
output()->print(" %s", x->field()->name()->as_utf8()); |
1 | 377 |
} |
378 |
||
379 |
||
380 |
void InstructionPrinter::do_StoreField(StoreField* x) { |
|
381 |
print_field(x); |
|
382 |
output()->print(" := "); |
|
383 |
print_value(x->value()); |
|
384 |
output()->print(" (%c)", type2char(x->field()->type()->basic_type())); |
|
16611 | 385 |
output()->print(" %s", x->field()->name()->as_utf8()); |
1 | 386 |
} |
387 |
||
388 |
||
389 |
void InstructionPrinter::do_ArrayLength(ArrayLength* x) { |
|
390 |
print_value(x->array()); |
|
391 |
output()->print(".length"); |
|
392 |
} |
|
393 |
||
394 |
||
395 |
void InstructionPrinter::do_LoadIndexed(LoadIndexed* x) { |
|
396 |
print_indexed(x); |
|
397 |
output()->print(" (%c)", type2char(x->elt_type())); |
|
16611 | 398 |
if (x->check_flag(Instruction::NeedsRangeCheckFlag)) { |
399 |
output()->print(" [rc]"); |
|
400 |
} |
|
1 | 401 |
} |
402 |
||
403 |
||
404 |
void InstructionPrinter::do_StoreIndexed(StoreIndexed* x) { |
|
405 |
print_indexed(x); |
|
406 |
output()->print(" := "); |
|
407 |
print_value(x->value()); |
|
408 |
output()->print(" (%c)", type2char(x->elt_type())); |
|
16611 | 409 |
if (x->check_flag(Instruction::NeedsRangeCheckFlag)) { |
410 |
output()->print(" [rc]"); |
|
411 |
} |
|
1 | 412 |
} |
413 |
||
414 |
void InstructionPrinter::do_NegateOp(NegateOp* x) { |
|
415 |
output()->put('-'); |
|
416 |
print_value(x->x()); |
|
417 |
} |
|
418 |
||
419 |
||
420 |
void InstructionPrinter::do_ArithmeticOp(ArithmeticOp* x) { |
|
421 |
print_op2(x); |
|
422 |
} |
|
423 |
||
424 |
||
425 |
void InstructionPrinter::do_ShiftOp(ShiftOp* x) { |
|
426 |
print_op2(x); |
|
427 |
} |
|
428 |
||
429 |
||
430 |
void InstructionPrinter::do_LogicOp(LogicOp* x) { |
|
431 |
print_op2(x); |
|
432 |
} |
|
433 |
||
434 |
||
435 |
void InstructionPrinter::do_CompareOp(CompareOp* x) { |
|
436 |
print_op2(x); |
|
437 |
} |
|
438 |
||
439 |
||
440 |
void InstructionPrinter::do_IfOp(IfOp* x) { |
|
441 |
print_value(x->x()); |
|
442 |
output()->print(" %s ", cond_name(x->cond())); |
|
443 |
print_value(x->y()); |
|
444 |
output()->print(" ? "); |
|
445 |
print_value(x->tval()); |
|
446 |
output()->print(" : "); |
|
447 |
print_value(x->fval()); |
|
448 |
} |
|
449 |
||
450 |
||
451 |
void InstructionPrinter::do_Convert(Convert* x) { |
|
452 |
output()->print("%s(", Bytecodes::name(x->op())); |
|
453 |
print_value(x->value()); |
|
454 |
output()->put(')'); |
|
455 |
} |
|
456 |
||
457 |
||
458 |
void InstructionPrinter::do_NullCheck(NullCheck* x) { |
|
459 |
output()->print("null_check("); |
|
460 |
print_value(x->obj()); |
|
461 |
output()->put(')'); |
|
462 |
if (!x->can_trap()) { |
|
463 |
output()->print(" (eliminated)"); |
|
464 |
} |
|
465 |
} |
|
466 |
||
467 |
||
13391
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
11886
diff
changeset
|
468 |
void InstructionPrinter::do_TypeCast(TypeCast* x) { |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
11886
diff
changeset
|
469 |
output()->print("type_cast("); |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
11886
diff
changeset
|
470 |
print_value(x->obj()); |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
11886
diff
changeset
|
471 |
output()->print(") "); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
472 |
if (x->declared_type()->is_klass()) |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
473 |
print_klass(x->declared_type()->as_klass()); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
474 |
else |
24424
2658d7834c6e
8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents:
20709
diff
changeset
|
475 |
output()->print("%s", type2name(x->declared_type()->basic_type())); |
13391
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
11886
diff
changeset
|
476 |
} |
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
11886
diff
changeset
|
477 |
|
30245956af37
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
11886
diff
changeset
|
478 |
|
1 | 479 |
void InstructionPrinter::do_Invoke(Invoke* x) { |
480 |
if (x->receiver() != NULL) { |
|
481 |
print_value(x->receiver()); |
|
482 |
output()->print("."); |
|
483 |
} |
|
484 |
||
485 |
output()->print("%s(", Bytecodes::name(x->code())); |
|
486 |
for (int i = 0; i < x->number_of_arguments(); i++) { |
|
487 |
if (i > 0) output()->print(", "); |
|
488 |
print_value(x->argument_at(i)); |
|
489 |
} |
|
490 |
output()->print_cr(")"); |
|
491 |
fill_to(instr_pos); |
|
492 |
output()->print("%s.%s%s", |
|
493 |
x->target()->holder()->name()->as_utf8(), |
|
494 |
x->target()->name()->as_utf8(), |
|
495 |
x->target()->signature()->as_symbol()->as_utf8()); |
|
496 |
} |
|
497 |
||
498 |
||
499 |
void InstructionPrinter::do_NewInstance(NewInstance* x) { |
|
500 |
output()->print("new instance "); |
|
501 |
print_klass(x->klass()); |
|
502 |
} |
|
503 |
||
504 |
||
505 |
void InstructionPrinter::do_NewTypeArray(NewTypeArray* x) { |
|
506 |
output()->print("new %s array [", basic_type_name(x->elt_type())); |
|
507 |
print_value(x->length()); |
|
508 |
output()->put(']'); |
|
509 |
} |
|
510 |
||
511 |
||
512 |
void InstructionPrinter::do_NewObjectArray(NewObjectArray* x) { |
|
513 |
output()->print("new object array ["); |
|
514 |
print_value(x->length()); |
|
515 |
output()->print("] "); |
|
516 |
print_klass(x->klass()); |
|
517 |
} |
|
518 |
||
519 |
||
520 |
void InstructionPrinter::do_NewMultiArray(NewMultiArray* x) { |
|
521 |
output()->print("new multi array ["); |
|
522 |
Values* dims = x->dims(); |
|
523 |
for (int i = 0; i < dims->length(); i++) { |
|
524 |
if (i > 0) output()->print(", "); |
|
525 |
print_value(dims->at(i)); |
|
526 |
} |
|
527 |
output()->print("] "); |
|
528 |
print_klass(x->klass()); |
|
529 |
} |
|
530 |
||
531 |
||
532 |
void InstructionPrinter::do_MonitorEnter(MonitorEnter* x) { |
|
533 |
output()->print("enter "); |
|
534 |
print_monitor(x); |
|
535 |
} |
|
536 |
||
537 |
||
538 |
void InstructionPrinter::do_MonitorExit(MonitorExit* x) { |
|
539 |
output()->print("exit "); |
|
540 |
print_monitor(x); |
|
541 |
} |
|
542 |
||
543 |
||
544 |
void InstructionPrinter::do_Intrinsic(Intrinsic* x) { |
|
545 |
const char* name = vmIntrinsics::name_at(x->id()); |
|
546 |
if (name[0] == '_') name++; // strip leading bug from _hashCode, etc. |
|
547 |
const char* kname = vmSymbols::name_for(vmIntrinsics::class_for(x->id())); |
|
548 |
if (strchr(name, '_') == NULL) { |
|
549 |
kname = NULL; |
|
550 |
} else { |
|
551 |
const char* kptr = strrchr(kname, '/'); |
|
552 |
if (kptr != NULL) kname = kptr + 1; |
|
553 |
} |
|
554 |
if (kname == NULL) |
|
555 |
output()->print("%s(", name); |
|
556 |
else |
|
557 |
output()->print("%s.%s(", kname, name); |
|
558 |
for (int i = 0; i < x->number_of_arguments(); i++) { |
|
559 |
if (i > 0) output()->print(", "); |
|
560 |
print_value(x->argument_at(i)); |
|
561 |
} |
|
562 |
output()->put(')'); |
|
563 |
} |
|
564 |
||
565 |
||
566 |
void InstructionPrinter::do_BlockBegin(BlockBegin* x) { |
|
567 |
// print block id |
|
568 |
BlockEnd* end = x->end(); |
|
569 |
output()->print("B%d ", x->block_id()); |
|
570 |
||
571 |
// print flags |
|
572 |
bool printed_flag = false; |
|
573 |
if (x->is_set(BlockBegin::std_entry_flag)) { |
|
574 |
if (!printed_flag) output()->print("("); |
|
575 |
output()->print("S"); printed_flag = true; |
|
576 |
} |
|
577 |
if (x->is_set(BlockBegin::osr_entry_flag)) { |
|
578 |
if (!printed_flag) output()->print("("); |
|
579 |
output()->print("O"); printed_flag = true; |
|
580 |
} |
|
581 |
if (x->is_set(BlockBegin::exception_entry_flag)) { |
|
582 |
if (!printed_flag) output()->print("("); |
|
583 |
output()->print("E"); printed_flag = true; |
|
584 |
} |
|
585 |
if (x->is_set(BlockBegin::subroutine_entry_flag)) { |
|
586 |
if (!printed_flag) output()->print("("); |
|
587 |
output()->print("s"); printed_flag = true; |
|
588 |
} |
|
589 |
if (x->is_set(BlockBegin::parser_loop_header_flag)) { |
|
590 |
if (!printed_flag) output()->print("("); |
|
591 |
output()->print("LH"); printed_flag = true; |
|
592 |
} |
|
593 |
if (x->is_set(BlockBegin::backward_branch_target_flag)) { |
|
594 |
if (!printed_flag) output()->print("("); |
|
595 |
output()->print("b"); printed_flag = true; |
|
596 |
} |
|
597 |
if (x->is_set(BlockBegin::was_visited_flag)) { |
|
598 |
if (!printed_flag) output()->print("("); |
|
599 |
output()->print("V"); printed_flag = true; |
|
600 |
} |
|
601 |
if (printed_flag) output()->print(") "); |
|
602 |
||
603 |
// print block bci range |
|
6745 | 604 |
output()->print("[%d, %d]", x->bci(), (end == NULL ? -1 : end->printable_bci())); |
1 | 605 |
|
606 |
// print block successors |
|
607 |
if (end != NULL && end->number_of_sux() > 0) { |
|
608 |
output()->print(" ->"); |
|
609 |
for (int i = 0; i < end->number_of_sux(); i++) { |
|
610 |
output()->print(" B%d", end->sux_at(i)->block_id()); |
|
611 |
} |
|
612 |
} |
|
613 |
// print exception handlers |
|
614 |
if (x->number_of_exception_handlers() > 0) { |
|
615 |
output()->print(" (xhandlers "); |
|
616 |
for (int i = 0; i < x->number_of_exception_handlers(); i++) { |
|
617 |
if (i > 0) output()->print(" "); |
|
618 |
output()->print("B%d", x->exception_handler_at(i)->block_id()); |
|
619 |
} |
|
620 |
output()->put(')'); |
|
621 |
} |
|
622 |
||
623 |
// print dominator block |
|
624 |
if (x->dominator() != NULL) { |
|
625 |
output()->print(" dom B%d", x->dominator()->block_id()); |
|
626 |
} |
|
627 |
||
628 |
// print predecessors and successors |
|
629 |
if (x->successors()->length() > 0) { |
|
630 |
output()->print(" sux:"); |
|
631 |
for (int i = 0; i < x->successors()->length(); i ++) { |
|
632 |
output()->print(" B%d", x->successors()->at(i)->block_id()); |
|
633 |
} |
|
634 |
} |
|
635 |
||
636 |
if (x->number_of_preds() > 0) { |
|
637 |
output()->print(" pred:"); |
|
638 |
for (int i = 0; i < x->number_of_preds(); i ++) { |
|
639 |
output()->print(" B%d", x->pred_at(i)->block_id()); |
|
640 |
} |
|
641 |
} |
|
642 |
||
643 |
if (!_print_phis) { |
|
644 |
return; |
|
645 |
} |
|
646 |
||
647 |
// print phi functions |
|
648 |
bool has_phis_in_locals = false; |
|
649 |
bool has_phis_on_stack = false; |
|
650 |
||
651 |
if (x->end() && x->end()->state()) { |
|
652 |
ValueStack* state = x->state(); |
|
653 |
||
654 |
int i = 0; |
|
655 |
while (!has_phis_on_stack && i < state->stack_size()) { |
|
656 |
Value v = state->stack_at_inc(i); |
|
657 |
has_phis_on_stack = is_phi_of_block(v, x); |
|
658 |
} |
|
659 |
||
660 |
do { |
|
661 |
for (i = 0; !has_phis_in_locals && i < state->locals_size();) { |
|
662 |
Value v = state->local_at(i); |
|
663 |
has_phis_in_locals = is_phi_of_block(v, x); |
|
664 |
// also ignore illegal HiWords |
|
665 |
if (v && !v->type()->is_illegal()) i += v->type()->size(); else i ++; |
|
666 |
} |
|
667 |
state = state->caller_state(); |
|
668 |
} while (state != NULL); |
|
669 |
||
670 |
} |
|
671 |
||
672 |
// print values in locals |
|
673 |
if (has_phis_in_locals) { |
|
674 |
output()->cr(); output()->print_cr("Locals:"); |
|
675 |
||
676 |
ValueStack* state = x->state(); |
|
677 |
do { |
|
678 |
for (int i = 0; i < state->locals_size();) { |
|
679 |
Value v = state->local_at(i); |
|
680 |
if (v) { |
|
681 |
print_phi(i, v, x); output()->cr(); |
|
682 |
// also ignore illegal HiWords |
|
683 |
i += (v->type()->is_illegal() ? 1 : v->type()->size()); |
|
684 |
} else { |
|
685 |
i ++; |
|
686 |
} |
|
687 |
} |
|
688 |
output()->cr(); |
|
689 |
state = state->caller_state(); |
|
690 |
} while (state != NULL); |
|
691 |
} |
|
692 |
||
693 |
// print values on stack |
|
694 |
if (has_phis_on_stack) { |
|
695 |
output()->print_cr("Stack:"); |
|
696 |
int i = 0; |
|
697 |
while (i < x->state()->stack_size()) { |
|
698 |
int o = i; |
|
699 |
Value v = x->state()->stack_at_inc(i); |
|
700 |
if (v) { |
|
701 |
print_phi(o, v, x); output()->cr(); |
|
702 |
} |
|
703 |
} |
|
704 |
} |
|
705 |
} |
|
706 |
||
707 |
||
708 |
void InstructionPrinter::do_CheckCast(CheckCast* x) { |
|
709 |
output()->print("checkcast("); |
|
710 |
print_value(x->obj()); |
|
711 |
output()->print(") "); |
|
712 |
print_klass(x->klass()); |
|
713 |
} |
|
714 |
||
715 |
||
716 |
void InstructionPrinter::do_InstanceOf(InstanceOf* x) { |
|
717 |
output()->print("instanceof("); |
|
718 |
print_value(x->obj()); |
|
719 |
output()->print(") "); |
|
720 |
print_klass(x->klass()); |
|
721 |
} |
|
722 |
||
723 |
||
724 |
void InstructionPrinter::do_Goto(Goto* x) { |
|
725 |
output()->print("goto B%d", x->default_sux()->block_id()); |
|
726 |
if (x->is_safepoint()) output()->print(" (safepoint)"); |
|
727 |
} |
|
728 |
||
729 |
||
730 |
void InstructionPrinter::do_If(If* x) { |
|
731 |
output()->print("if "); |
|
732 |
print_value(x->x()); |
|
733 |
output()->print(" %s ", cond_name(x->cond())); |
|
734 |
print_value(x->y()); |
|
735 |
output()->print(" then B%d else B%d", x->sux_at(0)->block_id(), x->sux_at(1)->block_id()); |
|
736 |
if (x->is_safepoint()) output()->print(" (safepoint)"); |
|
737 |
} |
|
738 |
||
739 |
||
740 |
void InstructionPrinter::do_IfInstanceOf(IfInstanceOf* x) { |
|
741 |
output()->print("<IfInstanceOf>"); |
|
742 |
} |
|
743 |
||
744 |
||
745 |
void InstructionPrinter::do_TableSwitch(TableSwitch* x) { |
|
746 |
output()->print("tableswitch "); |
|
747 |
if (x->is_safepoint()) output()->print("(safepoint) "); |
|
748 |
print_value(x->tag()); |
|
749 |
output()->cr(); |
|
750 |
int l = x->length(); |
|
751 |
for (int i = 0; i < l; i++) { |
|
752 |
fill_to(instr_pos); |
|
753 |
output()->print_cr("case %5d: B%d", x->lo_key() + i, x->sux_at(i)->block_id()); |
|
754 |
} |
|
755 |
fill_to(instr_pos); |
|
756 |
output()->print("default : B%d", x->default_sux()->block_id()); |
|
757 |
} |
|
758 |
||
759 |
||
760 |
void InstructionPrinter::do_LookupSwitch(LookupSwitch* x) { |
|
761 |
output()->print("lookupswitch "); |
|
762 |
if (x->is_safepoint()) output()->print("(safepoint) "); |
|
763 |
print_value(x->tag()); |
|
764 |
output()->cr(); |
|
765 |
int l = x->length(); |
|
766 |
for (int i = 0; i < l; i++) { |
|
767 |
fill_to(instr_pos); |
|
768 |
output()->print_cr("case %5d: B%d", x->key_at(i), x->sux_at(i)->block_id()); |
|
769 |
} |
|
770 |
fill_to(instr_pos); |
|
771 |
output()->print("default : B%d", x->default_sux()->block_id()); |
|
772 |
} |
|
773 |
||
774 |
||
775 |
void InstructionPrinter::do_Return(Return* x) { |
|
776 |
if (x->result() == NULL) { |
|
777 |
output()->print("return"); |
|
778 |
} else { |
|
779 |
output()->print("%creturn ", x->type()->tchar()); |
|
780 |
print_value(x->result()); |
|
781 |
} |
|
782 |
} |
|
783 |
||
784 |
||
785 |
void InstructionPrinter::do_Throw(Throw* x) { |
|
786 |
output()->print("throw "); |
|
787 |
print_value(x->exception()); |
|
788 |
} |
|
789 |
||
790 |
||
791 |
void InstructionPrinter::do_Base(Base* x) { |
|
792 |
output()->print("std entry B%d", x->std_entry()->block_id()); |
|
793 |
if (x->number_of_sux() > 1) { |
|
794 |
output()->print(" osr entry B%d", x->osr_entry()->block_id()); |
|
795 |
} |
|
796 |
} |
|
797 |
||
798 |
||
799 |
void InstructionPrinter::do_OsrEntry(OsrEntry* x) { |
|
800 |
output()->print("osr entry"); |
|
801 |
} |
|
802 |
||
803 |
||
804 |
void InstructionPrinter::do_ExceptionObject(ExceptionObject* x) { |
|
805 |
output()->print("incoming exception"); |
|
806 |
} |
|
807 |
||
808 |
||
809 |
void InstructionPrinter::do_RoundFP(RoundFP* x) { |
|
810 |
output()->print("round_fp "); |
|
811 |
print_value(x->input()); |
|
812 |
} |
|
813 |
||
814 |
||
815 |
void InstructionPrinter::do_UnsafeGetRaw(UnsafeGetRaw* x) { |
|
816 |
print_unsafe_raw_op(x, "UnsafeGetRaw"); |
|
817 |
output()->put(')'); |
|
818 |
} |
|
819 |
||
820 |
||
821 |
void InstructionPrinter::do_UnsafePutRaw(UnsafePutRaw* x) { |
|
822 |
print_unsafe_raw_op(x, "UnsafePutRaw"); |
|
823 |
output()->print(", value "); |
|
824 |
print_value(x->value()); |
|
825 |
output()->put(')'); |
|
826 |
} |
|
827 |
||
828 |
||
829 |
void InstructionPrinter::do_UnsafeGetObject(UnsafeGetObject* x) { |
|
830 |
print_unsafe_object_op(x, "UnsafeGetObject"); |
|
831 |
output()->put(')'); |
|
832 |
} |
|
833 |
||
834 |
||
835 |
void InstructionPrinter::do_UnsafePutObject(UnsafePutObject* x) { |
|
836 |
print_unsafe_object_op(x, "UnsafePutObject"); |
|
837 |
output()->print(", value "); |
|
838 |
print_value(x->value()); |
|
839 |
output()->put(')'); |
|
840 |
} |
|
841 |
||
13886
8d82c4dfa722
7023898: Intrinsify AtomicLongFieldUpdater.getAndIncrement()
roland
parents:
13728
diff
changeset
|
842 |
void InstructionPrinter::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) { |
8d82c4dfa722
7023898: Intrinsify AtomicLongFieldUpdater.getAndIncrement()
roland
parents:
13728
diff
changeset
|
843 |
print_unsafe_object_op(x, x->is_add()?"UnsafeGetAndSetObject (add)":"UnsafeGetAndSetObject"); |
8d82c4dfa722
7023898: Intrinsify AtomicLongFieldUpdater.getAndIncrement()
roland
parents:
13728
diff
changeset
|
844 |
output()->print(", value "); |
8d82c4dfa722
7023898: Intrinsify AtomicLongFieldUpdater.getAndIncrement()
roland
parents:
13728
diff
changeset
|
845 |
print_value(x->value()); |
8d82c4dfa722
7023898: Intrinsify AtomicLongFieldUpdater.getAndIncrement()
roland
parents:
13728
diff
changeset
|
846 |
output()->put(')'); |
8d82c4dfa722
7023898: Intrinsify AtomicLongFieldUpdater.getAndIncrement()
roland
parents:
13728
diff
changeset
|
847 |
} |
1 | 848 |
|
16611 | 849 |
void InstructionPrinter::do_RangeCheckPredicate(RangeCheckPredicate* x) { |
850 |
||
851 |
if (x->x() != NULL && x->y() != NULL) { |
|
852 |
output()->print("if "); |
|
853 |
print_value(x->x()); |
|
854 |
output()->print(" %s ", cond_name(x->cond())); |
|
855 |
print_value(x->y()); |
|
856 |
output()->print(" then deoptimize!"); |
|
857 |
} else { |
|
858 |
output()->print("always deoptimize!"); |
|
859 |
} |
|
860 |
} |
|
861 |
||
17011
def8879c5b81
8011648: C1: optimized build is broken after 7153771
roland
parents:
16611
diff
changeset
|
862 |
#ifdef ASSERT |
16611 | 863 |
void InstructionPrinter::do_Assert(Assert* x) { |
864 |
output()->print("assert "); |
|
865 |
print_value(x->x()); |
|
866 |
output()->print(" %s ", cond_name(x->cond())); |
|
867 |
print_value(x->y()); |
|
868 |
} |
|
17011
def8879c5b81
8011648: C1: optimized build is broken after 7153771
roland
parents:
16611
diff
changeset
|
869 |
#endif |
1 | 870 |
|
871 |
void InstructionPrinter::do_ProfileCall(ProfileCall* x) { |
|
872 |
output()->print("profile "); |
|
873 |
print_value(x->recv()); |
|
874 |
output()->print(" %s.%s", x->method()->holder()->name()->as_utf8(), x->method()->name()->as_utf8()); |
|
875 |
if (x->known_holder() != NULL) { |
|
876 |
output()->print(", "); |
|
877 |
print_klass(x->known_holder()); |
|
20702
bbe0fcde6e13
8023657: New type profiling points: arguments to call
roland
parents:
17011
diff
changeset
|
878 |
output()->print(" "); |
bbe0fcde6e13
8023657: New type profiling points: arguments to call
roland
parents:
17011
diff
changeset
|
879 |
} |
bbe0fcde6e13
8023657: New type profiling points: arguments to call
roland
parents:
17011
diff
changeset
|
880 |
for (int i = 0; i < x->nb_profiled_args(); i++) { |
bbe0fcde6e13
8023657: New type profiling points: arguments to call
roland
parents:
17011
diff
changeset
|
881 |
if (i > 0) output()->print(", "); |
bbe0fcde6e13
8023657: New type profiling points: arguments to call
roland
parents:
17011
diff
changeset
|
882 |
print_value(x->profiled_arg_at(i)); |
bbe0fcde6e13
8023657: New type profiling points: arguments to call
roland
parents:
17011
diff
changeset
|
883 |
if (x->arg_needs_null_check(i)) { |
bbe0fcde6e13
8023657: New type profiling points: arguments to call
roland
parents:
17011
diff
changeset
|
884 |
output()->print(" [NC]"); |
bbe0fcde6e13
8023657: New type profiling points: arguments to call
roland
parents:
17011
diff
changeset
|
885 |
} |
1 | 886 |
} |
887 |
output()->put(')'); |
|
888 |
} |
|
889 |
||
20709
034be898bf04
8026054: New type profiling points: type of return values at calls
roland
parents:
20702
diff
changeset
|
890 |
void InstructionPrinter::do_ProfileReturnType(ProfileReturnType* x) { |
034be898bf04
8026054: New type profiling points: type of return values at calls
roland
parents:
20702
diff
changeset
|
891 |
output()->print("profile ret type "); |
034be898bf04
8026054: New type profiling points: type of return values at calls
roland
parents:
20702
diff
changeset
|
892 |
print_value(x->ret()); |
034be898bf04
8026054: New type profiling points: type of return values at calls
roland
parents:
20702
diff
changeset
|
893 |
output()->print(" %s.%s", x->method()->holder()->name()->as_utf8(), x->method()->name()->as_utf8()); |
034be898bf04
8026054: New type profiling points: type of return values at calls
roland
parents:
20702
diff
changeset
|
894 |
output()->put(')'); |
034be898bf04
8026054: New type profiling points: type of return values at calls
roland
parents:
20702
diff
changeset
|
895 |
} |
6453 | 896 |
void InstructionPrinter::do_ProfileInvoke(ProfileInvoke* x) { |
897 |
output()->print("profile_invoke "); |
|
898 |
output()->print(" %s.%s", x->inlinee()->holder()->name()->as_utf8(), x->inlinee()->name()->as_utf8()); |
|
899 |
output()->put(')'); |
|
1 | 900 |
|
901 |
} |
|
902 |
||
8065
7ca689ce3d32
6809483: hotspot:::method_entry are not correctly generated for "method()V"
never
parents:
7397
diff
changeset
|
903 |
void InstructionPrinter::do_RuntimeCall(RuntimeCall* x) { |
7ca689ce3d32
6809483: hotspot:::method_entry are not correctly generated for "method()V"
never
parents:
7397
diff
changeset
|
904 |
output()->print("call_rt %s(", x->entry_name()); |
7ca689ce3d32
6809483: hotspot:::method_entry are not correctly generated for "method()V"
never
parents:
7397
diff
changeset
|
905 |
for (int i = 0; i < x->number_of_arguments(); i++) { |
7ca689ce3d32
6809483: hotspot:::method_entry are not correctly generated for "method()V"
never
parents:
7397
diff
changeset
|
906 |
if (i > 0) output()->print(", "); |
7ca689ce3d32
6809483: hotspot:::method_entry are not correctly generated for "method()V"
never
parents:
7397
diff
changeset
|
907 |
print_value(x->argument_at(i)); |
7ca689ce3d32
6809483: hotspot:::method_entry are not correctly generated for "method()V"
never
parents:
7397
diff
changeset
|
908 |
} |
7ca689ce3d32
6809483: hotspot:::method_entry are not correctly generated for "method()V"
never
parents:
7397
diff
changeset
|
909 |
output()->put(')'); |
7ca689ce3d32
6809483: hotspot:::method_entry are not correctly generated for "method()V"
never
parents:
7397
diff
changeset
|
910 |
} |
7ca689ce3d32
6809483: hotspot:::method_entry are not correctly generated for "method()V"
never
parents:
7397
diff
changeset
|
911 |
|
11886
feebf5c9f40c
7120481: storeStore barrier in constructor with final field
jiangli
parents:
9629
diff
changeset
|
912 |
void InstructionPrinter::do_MemBar(MemBar* x) { |
51996
84743156e780
8188764: Obsolete AssumeMP and then remove all support for non-MP builds
dholmes
parents:
47216
diff
changeset
|
913 |
LIR_Code code = x->code(); |
84743156e780
8188764: Obsolete AssumeMP and then remove all support for non-MP builds
dholmes
parents:
47216
diff
changeset
|
914 |
switch (code) { |
84743156e780
8188764: Obsolete AssumeMP and then remove all support for non-MP builds
dholmes
parents:
47216
diff
changeset
|
915 |
case lir_membar_acquire : output()->print("membar_acquire"); break; |
84743156e780
8188764: Obsolete AssumeMP and then remove all support for non-MP builds
dholmes
parents:
47216
diff
changeset
|
916 |
case lir_membar_release : output()->print("membar_release"); break; |
84743156e780
8188764: Obsolete AssumeMP and then remove all support for non-MP builds
dholmes
parents:
47216
diff
changeset
|
917 |
case lir_membar : output()->print("membar"); break; |
84743156e780
8188764: Obsolete AssumeMP and then remove all support for non-MP builds
dholmes
parents:
47216
diff
changeset
|
918 |
case lir_membar_loadload : output()->print("membar_loadload"); break; |
84743156e780
8188764: Obsolete AssumeMP and then remove all support for non-MP builds
dholmes
parents:
47216
diff
changeset
|
919 |
case lir_membar_storestore: output()->print("membar_storestore"); break; |
84743156e780
8188764: Obsolete AssumeMP and then remove all support for non-MP builds
dholmes
parents:
47216
diff
changeset
|
920 |
case lir_membar_loadstore : output()->print("membar_loadstore"); break; |
84743156e780
8188764: Obsolete AssumeMP and then remove all support for non-MP builds
dholmes
parents:
47216
diff
changeset
|
921 |
case lir_membar_storeload : output()->print("membar_storeload"); break; |
84743156e780
8188764: Obsolete AssumeMP and then remove all support for non-MP builds
dholmes
parents:
47216
diff
changeset
|
922 |
default : ShouldNotReachHere(); break; |
11886
feebf5c9f40c
7120481: storeStore barrier in constructor with final field
jiangli
parents:
9629
diff
changeset
|
923 |
} |
feebf5c9f40c
7120481: storeStore barrier in constructor with final field
jiangli
parents:
9629
diff
changeset
|
924 |
} |
feebf5c9f40c
7120481: storeStore barrier in constructor with final field
jiangli
parents:
9629
diff
changeset
|
925 |
|
1 | 926 |
#endif // PRODUCT |