Mercurial > hg > truffle
comparison src/share/vm/opto/bytecodeInfo.cpp @ 12295:1b64d46620a3
8022585: VM crashes when ran with -XX:+PrintInlining
Summary: use adr_at() to access inline info structures in growableArray. Add ability to specify print inlining per method.
Reviewed-by: twisti
author | kvn |
---|---|
date | Tue, 24 Sep 2013 16:08:00 -0700 |
parents | 02d7aa1456c9 |
children | cefad50507d8 0c4c40f5c399 |
comparison
equal
deleted
inserted
replaced
12294:891687731b59 | 12295:1b64d46620a3 |
---|---|
121 int caller_bci, ciCallProfile& profile, | 121 int caller_bci, ciCallProfile& profile, |
122 WarmCallInfo* wci_result) { | 122 WarmCallInfo* wci_result) { |
123 // Allows targeted inlining | 123 // Allows targeted inlining |
124 if(callee_method->should_inline()) { | 124 if(callee_method->should_inline()) { |
125 *wci_result = *(WarmCallInfo::always_hot()); | 125 *wci_result = *(WarmCallInfo::always_hot()); |
126 if (PrintInlining && Verbose) { | 126 if (C->print_inlining() && Verbose) { |
127 CompileTask::print_inline_indent(inline_level()); | 127 CompileTask::print_inline_indent(inline_level()); |
128 tty->print_cr("Inlined method is hot: "); | 128 tty->print_cr("Inlined method is hot: "); |
129 } | 129 } |
130 set_msg("force inline by CompilerOracle"); | 130 set_msg("force inline by CompilerOracle"); |
131 return true; | 131 return true; |
135 | 135 |
136 // Check for too many throws (and not too huge) | 136 // Check for too many throws (and not too huge) |
137 if(callee_method->interpreter_throwout_count() > InlineThrowCount && | 137 if(callee_method->interpreter_throwout_count() > InlineThrowCount && |
138 size < InlineThrowMaxSize ) { | 138 size < InlineThrowMaxSize ) { |
139 wci_result->set_profit(wci_result->profit() * 100); | 139 wci_result->set_profit(wci_result->profit() * 100); |
140 if (PrintInlining && Verbose) { | 140 if (C->print_inlining() && Verbose) { |
141 CompileTask::print_inline_indent(inline_level()); | 141 CompileTask::print_inline_indent(inline_level()); |
142 tty->print_cr("Inlined method with many throws (throws=%d):", callee_method->interpreter_throwout_count()); | 142 tty->print_cr("Inlined method with many throws (throws=%d):", callee_method->interpreter_throwout_count()); |
143 } | 143 } |
144 set_msg("many throws"); | 144 set_msg("many throws"); |
145 return true; | 145 return true; |
489 C->log()->inline_success(inline_msg); | 489 C->log()->inline_success(inline_msg); |
490 } else { | 490 } else { |
491 C->log()->inline_fail(inline_msg); | 491 C->log()->inline_fail(inline_msg); |
492 } | 492 } |
493 } | 493 } |
494 if (PrintInlining) { | 494 if (C->print_inlining()) { |
495 C->print_inlining(callee_method, inline_level(), caller_bci, inline_msg); | 495 C->print_inlining(callee_method, inline_level(), caller_bci, inline_msg); |
496 if (callee_method == NULL) tty->print(" callee not monotonic or profiled"); | 496 if (callee_method == NULL) tty->print(" callee not monotonic or profiled"); |
497 if (Verbose && callee_method) { | 497 if (Verbose && callee_method) { |
498 const InlineTree *top = this; | 498 const InlineTree *top = this; |
499 while( top->caller_tree() != NULL ) { top = top->caller_tree(); } | 499 while( top->caller_tree() != NULL ) { top = top->caller_tree(); } |
538 bool success = try_to_inline(callee_method, caller_method, caller_bci, | 538 bool success = try_to_inline(callee_method, caller_method, caller_bci, |
539 profile, &wci, should_delay); | 539 profile, &wci, should_delay); |
540 | 540 |
541 #ifndef PRODUCT | 541 #ifndef PRODUCT |
542 if (UseOldInlining && InlineWarmCalls | 542 if (UseOldInlining && InlineWarmCalls |
543 && (PrintOpto || PrintOptoInlining || PrintInlining)) { | 543 && (PrintOpto || C->print_inlining())) { |
544 bool cold = wci.is_cold(); | 544 bool cold = wci.is_cold(); |
545 bool hot = !cold && wci.is_hot(); | 545 bool hot = !cold && wci.is_hot(); |
546 bool old_cold = !success; | 546 bool old_cold = !success; |
547 if (old_cold != cold || (Verbose || WizardMode)) { | 547 if (old_cold != cold || (Verbose || WizardMode)) { |
548 if (msg() == NULL) { | 548 if (msg() == NULL) { |
615 max_inline_level_adjust += 1; // don't count actions in MH or indy adapter frames | 615 max_inline_level_adjust += 1; // don't count actions in MH or indy adapter frames |
616 else if (callee_method->is_method_handle_intrinsic() || | 616 else if (callee_method->is_method_handle_intrinsic() || |
617 callee_method->is_compiled_lambda_form()) { | 617 callee_method->is_compiled_lambda_form()) { |
618 max_inline_level_adjust += 1; // don't count method handle calls from java.lang.invoke implem | 618 max_inline_level_adjust += 1; // don't count method handle calls from java.lang.invoke implem |
619 } | 619 } |
620 if (max_inline_level_adjust != 0 && PrintInlining && (Verbose || WizardMode)) { | 620 if (max_inline_level_adjust != 0 && C->print_inlining() && (Verbose || WizardMode)) { |
621 CompileTask::print_inline_indent(inline_level()); | 621 CompileTask::print_inline_indent(inline_level()); |
622 tty->print_cr(" \\-> discounting inline depth"); | 622 tty->print_cr(" \\-> discounting inline depth"); |
623 } | 623 } |
624 if (max_inline_level_adjust != 0 && C->log()) { | 624 if (max_inline_level_adjust != 0 && C->log()) { |
625 int id1 = C->log()->identify(caller_jvms->method()); | 625 int id1 = C->log()->identify(caller_jvms->method()); |