提交 3ad2a9b9 编写于 作者: I iveresov

7112085: assert(fr.interpreter_frame_expression_stack_size()==0) failed: only handle empty stacks

Summary: Move the inlinee invoke notification callback into inlinee preamble
Reviewed-by: kvn, never
上级 d718c369
...@@ -3495,9 +3495,6 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, BlockBeg ...@@ -3495,9 +3495,6 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, BlockBeg
if (profile_calls()) { if (profile_calls()) {
profile_call(recv, holder_known ? callee->holder() : NULL); 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 // 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 ...@@ -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)); 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); BlockBegin* callee_start_block = block_at(0);
if (callee_start_block != NULL) { if (callee_start_block != NULL) {
assert(callee_start_block->is_set(BlockBegin::parser_loop_header_flag), "must be loop header"); assert(callee_start_block->is_set(BlockBegin::parser_loop_header_flag), "must be loop header");
......
...@@ -501,6 +501,7 @@ class Instruction: public CompilationResourceObj { ...@@ -501,6 +501,7 @@ class Instruction: public CompilationResourceObj {
virtual RoundFP* as_RoundFP() { return NULL; } virtual RoundFP* as_RoundFP() { return NULL; }
virtual ExceptionObject* as_ExceptionObject() { return NULL; } virtual ExceptionObject* as_ExceptionObject() { return NULL; }
virtual UnsafeOp* as_UnsafeOp() { return NULL; } virtual UnsafeOp* as_UnsafeOp() { return NULL; }
virtual ProfileInvoke* as_ProfileInvoke() { return NULL; }
virtual void visit(InstructionVisitor* v) = 0; virtual void visit(InstructionVisitor* v) = 0;
......
...@@ -429,7 +429,7 @@ CodeEmitInfo* LIRGenerator::state_for(Instruction* x, ValueStack* state, bool ig ...@@ -429,7 +429,7 @@ CodeEmitInfo* LIRGenerator::state_for(Instruction* x, ValueStack* state, bool ig
// all locals are dead on exit from the synthetic unlocker // all locals are dead on exit from the synthetic unlocker
liveness.clear(); liveness.clear();
} else { } 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()) { if (!liveness.is_valid()) {
......
...@@ -30,6 +30,27 @@ ...@@ -30,6 +30,27 @@
#include "runtime/simpleThresholdPolicy.inline.hpp" #include "runtime/simpleThresholdPolicy.inline.hpp"
#include "code/scopeDesc.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. // Print an event.
void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodHandle imh, void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodHandle imh,
int bci, CompLevel level) { int bci, CompLevel level) {
...@@ -38,8 +59,6 @@ void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodH ...@@ -38,8 +59,6 @@ void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodH
ttyLocker tty_lock; ttyLocker tty_lock;
tty->print("%lf: [", os::elapsedTime()); tty->print("%lf: [", os::elapsedTime());
int invocation_count = mh->invocation_count();
int backedge_count = mh->backedge_count();
switch(type) { switch(type) {
case CALL: case CALL:
tty->print("call"); tty->print("call");
...@@ -82,23 +101,9 @@ void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodH ...@@ -82,23 +101,9 @@ void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodH
print_specific(type, mh, imh, bci, level); print_specific(type, mh, imh, bci, level);
if (type != COMPILE) { if (type != COMPILE) {
methodDataHandle mdh = mh->method_data(); print_counters("", mh);
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());
if (inlinee_event) { 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: "); tty->print(" compilable: ");
bool need_comma = false; bool need_comma = false;
......
...@@ -55,7 +55,7 @@ class SimpleThresholdPolicy : public CompilationPolicy { ...@@ -55,7 +55,7 @@ class SimpleThresholdPolicy : public CompilationPolicy {
// loop_event checks if a method should be OSR compiled at a different // loop_event checks if a method should be OSR compiled at a different
// level. // level.
CompLevel loop_event(methodOop method, CompLevel cur_level); CompLevel loop_event(methodOop method, CompLevel cur_level);
void print_counters(const char* prefix, methodHandle mh);
protected: protected:
int c1_count() const { return _c1_count; } int c1_count() const { return _c1_count; }
int c2_count() const { return _c2_count; } int c2_count() const { return _c2_count; }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
* @bug 6792161 * @bug 6792161
* @summary assert("No dead instructions after post-alloc") * @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; import java.lang.reflect.Constructor;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册