7112085: assert(fr.interpreter_frame_expression_stack_size()==0) failed: only handle empty stacks
Move the inlinee invoke notification callback into inlinee preamble Reviewed-by: kvn, never
This commit is contained in:
parent
8d2ee23293
commit
b6ce13798b
@ -3495,9 +3495,6 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, BlockBeg
|
||||
if (profile_calls()) {
|
||||
profile_call(recv, holder_known ? callee->holder() : NULL);
|
||||
}
|
||||
if (profile_inlined_calls()) {
|
||||
profile_invocation(callee, copy_state_before());
|
||||
}
|
||||
}
|
||||
|
||||
// Introduce a new callee continuation point - if the callee has
|
||||
@ -3571,6 +3568,10 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, BlockBeg
|
||||
append(new RuntimeCall(voidType, "dtrace_method_entry", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry), args));
|
||||
}
|
||||
|
||||
if (profile_inlined_calls()) {
|
||||
profile_invocation(callee, copy_state_before_with_bci(SynchronizationEntryBCI));
|
||||
}
|
||||
|
||||
BlockBegin* callee_start_block = block_at(0);
|
||||
if (callee_start_block != NULL) {
|
||||
assert(callee_start_block->is_set(BlockBegin::parser_loop_header_flag), "must be loop header");
|
||||
|
@ -501,6 +501,7 @@ class Instruction: public CompilationResourceObj {
|
||||
virtual RoundFP* as_RoundFP() { return NULL; }
|
||||
virtual ExceptionObject* as_ExceptionObject() { return NULL; }
|
||||
virtual UnsafeOp* as_UnsafeOp() { return NULL; }
|
||||
virtual ProfileInvoke* as_ProfileInvoke() { return NULL; }
|
||||
|
||||
virtual void visit(InstructionVisitor* v) = 0;
|
||||
|
||||
|
@ -429,7 +429,7 @@ CodeEmitInfo* LIRGenerator::state_for(Instruction* x, ValueStack* state, bool ig
|
||||
// all locals are dead on exit from the synthetic unlocker
|
||||
liveness.clear();
|
||||
} else {
|
||||
assert(x->as_MonitorEnter(), "only other case is MonitorEnter");
|
||||
assert(x->as_MonitorEnter() || x->as_ProfileInvoke(), "only other cases are MonitorEnter and ProfileInvoke");
|
||||
}
|
||||
}
|
||||
if (!liveness.is_valid()) {
|
||||
|
@ -30,6 +30,27 @@
|
||||
#include "runtime/simpleThresholdPolicy.inline.hpp"
|
||||
#include "code/scopeDesc.hpp"
|
||||
|
||||
|
||||
void SimpleThresholdPolicy::print_counters(const char* prefix, methodHandle mh) {
|
||||
int invocation_count = mh->invocation_count();
|
||||
int backedge_count = mh->backedge_count();
|
||||
methodDataHandle mdh = mh->method_data();
|
||||
int mdo_invocations = 0, mdo_backedges = 0;
|
||||
int mdo_invocations_start = 0, mdo_backedges_start = 0;
|
||||
if (mdh() != NULL) {
|
||||
mdo_invocations = mdh->invocation_count();
|
||||
mdo_backedges = mdh->backedge_count();
|
||||
mdo_invocations_start = mdh->invocation_count_start();
|
||||
mdo_backedges_start = mdh->backedge_count_start();
|
||||
}
|
||||
tty->print(" %stotal: %d,%d %smdo: %d(%d),%d(%d)", prefix,
|
||||
invocation_count, backedge_count, prefix,
|
||||
mdo_invocations, mdo_invocations_start,
|
||||
mdo_backedges, mdo_backedges_start);
|
||||
tty->print(" %smax levels: %d,%d", prefix,
|
||||
mh->highest_comp_level(), mh->highest_osr_comp_level());
|
||||
}
|
||||
|
||||
// Print an event.
|
||||
void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodHandle imh,
|
||||
int bci, CompLevel level) {
|
||||
@ -38,8 +59,6 @@ void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodH
|
||||
ttyLocker tty_lock;
|
||||
tty->print("%lf: [", os::elapsedTime());
|
||||
|
||||
int invocation_count = mh->invocation_count();
|
||||
int backedge_count = mh->backedge_count();
|
||||
switch(type) {
|
||||
case CALL:
|
||||
tty->print("call");
|
||||
@ -82,23 +101,9 @@ void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodH
|
||||
print_specific(type, mh, imh, bci, level);
|
||||
|
||||
if (type != COMPILE) {
|
||||
methodDataHandle mdh = mh->method_data();
|
||||
int mdo_invocations = 0, mdo_backedges = 0;
|
||||
int mdo_invocations_start = 0, mdo_backedges_start = 0;
|
||||
if (mdh() != NULL) {
|
||||
mdo_invocations = mdh->invocation_count();
|
||||
mdo_backedges = mdh->backedge_count();
|
||||
mdo_invocations_start = mdh->invocation_count_start();
|
||||
mdo_backedges_start = mdh->backedge_count_start();
|
||||
}
|
||||
tty->print(" total: %d,%d mdo: %d(%d),%d(%d)",
|
||||
invocation_count, backedge_count,
|
||||
mdo_invocations, mdo_invocations_start,
|
||||
mdo_backedges, mdo_backedges_start);
|
||||
tty->print(" max levels: %d,%d",
|
||||
mh->highest_comp_level(), mh->highest_osr_comp_level());
|
||||
print_counters("", mh);
|
||||
if (inlinee_event) {
|
||||
tty->print(" inlinee max levels: %d,%d", imh->highest_comp_level(), imh->highest_osr_comp_level());
|
||||
print_counters("inlinee ", imh);
|
||||
}
|
||||
tty->print(" compilable: ");
|
||||
bool need_comma = false;
|
||||
|
@ -55,7 +55,7 @@ class SimpleThresholdPolicy : public CompilationPolicy {
|
||||
// loop_event checks if a method should be OSR compiled at a different
|
||||
// level.
|
||||
CompLevel loop_event(methodOop method, CompLevel cur_level);
|
||||
|
||||
void print_counters(const char* prefix, methodHandle mh);
|
||||
protected:
|
||||
int c1_count() const { return _c1_count; }
|
||||
int c2_count() const { return _c2_count; }
|
||||
|
@ -27,7 +27,7 @@
|
||||
* @bug 6792161
|
||||
* @summary assert("No dead instructions after post-alloc")
|
||||
*
|
||||
* @run main/othervm -Xcomp -XX:MaxInlineSize=120 Test6792161
|
||||
* @run main/othervm/timeout=300 -Xcomp -XX:MaxInlineSize=120 Test6792161
|
||||
*/
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
|
Loading…
x
Reference in New Issue
Block a user