mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
7097679: Tiered: events with bad bci to Gotos reduced from Ifs
Save bci of instruction that produced Goto and use it to call back to runtime Reviewed-by: kvn, never
This commit is contained in:
parent
7f01a4d4f5
commit
a4975758bb
2 changed files with 6 additions and 6 deletions
|
@ -1165,11 +1165,11 @@ void GraphBuilder::_goto(int from_bci, int to_bci) {
|
||||||
Goto *x = new Goto(block_at(to_bci), to_bci <= from_bci);
|
Goto *x = new Goto(block_at(to_bci), to_bci <= from_bci);
|
||||||
if (is_profiling()) {
|
if (is_profiling()) {
|
||||||
compilation()->set_would_profile(true);
|
compilation()->set_would_profile(true);
|
||||||
}
|
|
||||||
if (profile_branches()) {
|
|
||||||
x->set_profiled_method(method());
|
|
||||||
x->set_profiled_bci(bci());
|
x->set_profiled_bci(bci());
|
||||||
x->set_should_profile(true);
|
if (profile_branches()) {
|
||||||
|
x->set_profiled_method(method());
|
||||||
|
x->set_should_profile(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
append(x);
|
append(x);
|
||||||
}
|
}
|
||||||
|
@ -1203,9 +1203,9 @@ void GraphBuilder::if_node(Value x, If::Condition cond, Value y, ValueStack* sta
|
||||||
Goto *goto_node = i->as_Goto();
|
Goto *goto_node = i->as_Goto();
|
||||||
if (goto_node != NULL) {
|
if (goto_node != NULL) {
|
||||||
compilation()->set_would_profile(true);
|
compilation()->set_would_profile(true);
|
||||||
|
goto_node->set_profiled_bci(bci());
|
||||||
if (profile_branches()) {
|
if (profile_branches()) {
|
||||||
goto_node->set_profiled_method(method());
|
goto_node->set_profiled_method(method());
|
||||||
goto_node->set_profiled_bci(bci());
|
|
||||||
goto_node->set_should_profile(true);
|
goto_node->set_should_profile(true);
|
||||||
// Find out which successor is used.
|
// Find out which successor is used.
|
||||||
if (goto_node->default_sux() == tsux) {
|
if (goto_node->default_sux() == tsux) {
|
||||||
|
|
|
@ -2493,7 +2493,7 @@ void LIRGenerator::do_Goto(Goto* x) {
|
||||||
|
|
||||||
// increment backedge counter if needed
|
// increment backedge counter if needed
|
||||||
CodeEmitInfo* info = state_for(x, state);
|
CodeEmitInfo* info = state_for(x, state);
|
||||||
increment_backedge_counter(info, info->stack()->bci());
|
increment_backedge_counter(info, x->profiled_bci());
|
||||||
CodeEmitInfo* safepoint_info = state_for(x, state);
|
CodeEmitInfo* safepoint_info = state_for(x, state);
|
||||||
__ safepoint(safepoint_poll_register(), safepoint_info);
|
__ safepoint(safepoint_poll_register(), safepoint_info);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue