7200001: failed C1 OSR compile doesn't get recompiled with C2
Reviewed-by: kvn
This commit is contained in:
parent
913a550c76
commit
0bae010a3b
@ -197,9 +197,9 @@ class CompilationLog : public StringEventLog {
|
||||
|
||||
void log_compile(JavaThread* thread, CompileTask* task) {
|
||||
StringLogMessage lm;
|
||||
stringStream msg = lm.stream();
|
||||
stringStream sstr = lm.stream();
|
||||
// msg.time_stamp().update_to(tty->time_stamp().ticks());
|
||||
task->print_compilation(&msg, true);
|
||||
task->print_compilation(&sstr, NULL, true);
|
||||
log(thread, "%s", (const char*)lm);
|
||||
}
|
||||
|
||||
@ -491,9 +491,9 @@ void CompileTask::print_inline_indent(int inline_level, outputStream* st) {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// CompileTask::print_compilation
|
||||
void CompileTask::print_compilation(outputStream* st, bool short_form) {
|
||||
void CompileTask::print_compilation(outputStream* st, const char* msg, bool short_form) {
|
||||
bool is_osr_method = osr_bci() != InvocationEntryBci;
|
||||
print_compilation_impl(st, method(), compile_id(), comp_level(), is_osr_method, osr_bci(), is_blocking(), NULL, short_form);
|
||||
print_compilation_impl(st, method(), compile_id(), comp_level(), is_osr_method, osr_bci(), is_blocking(), msg, short_form);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
@ -1249,7 +1249,7 @@ nmethod* CompileBroker::compile_method(methodHandle method, int osr_bci,
|
||||
// We accept a higher level osr method
|
||||
nmethod* nm = method->lookup_osr_nmethod_for(osr_bci, comp_level, false);
|
||||
if (nm != NULL) return nm;
|
||||
if (method->is_not_osr_compilable()) return NULL;
|
||||
if (method->is_not_osr_compilable(comp_level)) return NULL;
|
||||
}
|
||||
|
||||
assert(!HAS_PENDING_EXCEPTION, "No exception should be present");
|
||||
@ -1330,7 +1330,7 @@ bool CompileBroker::compilation_is_complete(methodHandle method,
|
||||
int comp_level) {
|
||||
bool is_osr = (osr_bci != standard_entry_bci);
|
||||
if (is_osr) {
|
||||
if (method->is_not_osr_compilable()) {
|
||||
if (method->is_not_osr_compilable(comp_level)) {
|
||||
return true;
|
||||
} else {
|
||||
nmethod* result = method->lookup_osr_nmethod_for(osr_bci, comp_level, true);
|
||||
@ -1381,7 +1381,7 @@ bool CompileBroker::compilation_is_prohibited(methodHandle method, int osr_bci,
|
||||
// Some compilers may not support on stack replacement.
|
||||
if (is_osr &&
|
||||
(!CICompileOSR || !compiler(comp_level)->supports_osr())) {
|
||||
method->set_not_osr_compilable();
|
||||
method->set_not_osr_compilable(comp_level);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1807,11 +1807,10 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) {
|
||||
_compilation_log->log_failure(thread, task, ci_env.failure_reason(), retry_message);
|
||||
}
|
||||
if (PrintCompilation) {
|
||||
tty->print("%4d COMPILE SKIPPED: %s", compile_id, ci_env.failure_reason());
|
||||
if (retry_message != NULL) {
|
||||
tty->print(" (%s)", retry_message);
|
||||
}
|
||||
tty->cr();
|
||||
FormatBufferResource msg = retry_message != NULL ?
|
||||
err_msg_res("COMPILE SKIPPED: %s (%s)", ci_env.failure_reason(), retry_message) :
|
||||
err_msg_res("COMPILE SKIPPED: %s", ci_env.failure_reason());
|
||||
task->print_compilation(tty, msg);
|
||||
}
|
||||
} else {
|
||||
task->mark_success();
|
||||
@ -1840,14 +1839,20 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) {
|
||||
tty->print_cr("size: %d time: %d inlined: %d bytes", code_size, (int)time.milliseconds(), task->num_inlined_bytecodes());
|
||||
}
|
||||
|
||||
if (compilable == ciEnv::MethodCompilable_never) {
|
||||
if (is_osr) {
|
||||
method->set_not_osr_compilable();
|
||||
} else {
|
||||
// Disable compilation, if required.
|
||||
switch (compilable) {
|
||||
case ciEnv::MethodCompilable_never:
|
||||
if (is_osr)
|
||||
method->set_not_osr_compilable_quietly();
|
||||
else
|
||||
method->set_not_compilable_quietly();
|
||||
}
|
||||
} else if (compilable == ciEnv::MethodCompilable_not_at_tier) {
|
||||
method->set_not_compilable_quietly(task->comp_level());
|
||||
break;
|
||||
case ciEnv::MethodCompilable_not_at_tier:
|
||||
if (is_osr)
|
||||
method->set_not_osr_compilable_quietly(task->comp_level());
|
||||
else
|
||||
method->set_not_compilable_quietly(task->comp_level());
|
||||
break;
|
||||
}
|
||||
|
||||
// Note that the queued_for_compilation bits are cleared without
|
||||
|
@ -105,7 +105,7 @@ private:
|
||||
const char* msg = NULL, bool short_form = false);
|
||||
|
||||
public:
|
||||
void print_compilation(outputStream* st = tty, bool short_form = false);
|
||||
void print_compilation(outputStream* st = tty, const char* msg = NULL, bool short_form = false);
|
||||
static void print_compilation(outputStream* st, const nmethod* nm, const char* msg = NULL, bool short_form = false) {
|
||||
print_compilation_impl(st, nm->method(), nm->compile_id(), nm->comp_level(),
|
||||
nm->is_osr_method(), nm->is_osr_method() ? nm->osr_entry_bci() : -1, /*is_blocking*/ false,
|
||||
|
@ -125,46 +125,46 @@ int CompileLog::identify(ciBaseObject* obj) {
|
||||
ciMetadata* mobj = obj->as_metadata();
|
||||
if (mobj->is_klass()) {
|
||||
ciKlass* klass = mobj->as_klass();
|
||||
begin_elem("klass id='%d'", id);
|
||||
name(klass->name());
|
||||
if (!klass->is_loaded()) {
|
||||
print(" unloaded='1'");
|
||||
} else {
|
||||
print(" flags='%d'", klass->modifier_flags());
|
||||
}
|
||||
end_elem();
|
||||
begin_elem("klass id='%d'", id);
|
||||
name(klass->name());
|
||||
if (!klass->is_loaded()) {
|
||||
print(" unloaded='1'");
|
||||
} else {
|
||||
print(" flags='%d'", klass->modifier_flags());
|
||||
}
|
||||
end_elem();
|
||||
} else if (mobj->is_method()) {
|
||||
ciMethod* method = mobj->as_method();
|
||||
ciSignature* sig = method->signature();
|
||||
// Pre-identify items that we will need!
|
||||
identify(sig->return_type());
|
||||
for (int i = 0; i < sig->count(); i++) {
|
||||
identify(sig->type_at(i));
|
||||
}
|
||||
begin_elem("method id='%d' holder='%d'",
|
||||
id, identify(method->holder()));
|
||||
name(method->name());
|
||||
print(" return='%d'", identify(sig->return_type()));
|
||||
if (sig->count() > 0) {
|
||||
print(" arguments='");
|
||||
ciSignature* sig = method->signature();
|
||||
// Pre-identify items that we will need!
|
||||
identify(sig->return_type());
|
||||
for (int i = 0; i < sig->count(); i++) {
|
||||
print((i == 0) ? "%d" : " %d", identify(sig->type_at(i)));
|
||||
identify(sig->type_at(i));
|
||||
}
|
||||
print("'");
|
||||
}
|
||||
if (!method->is_loaded()) {
|
||||
print(" unloaded='1'");
|
||||
} else {
|
||||
print(" flags='%d'", (jchar) method->flags().as_int());
|
||||
// output a few metrics
|
||||
print(" bytes='%d'", method->code_size());
|
||||
method->log_nmethod_identity(this);
|
||||
//print(" count='%d'", method->invocation_count());
|
||||
//int bec = method->backedge_count();
|
||||
//if (bec != 0) print(" backedge_count='%d'", bec);
|
||||
print(" iicount='%d'", method->interpreter_invocation_count());
|
||||
}
|
||||
end_elem();
|
||||
begin_elem("method id='%d' holder='%d'",
|
||||
id, identify(method->holder()));
|
||||
name(method->name());
|
||||
print(" return='%d'", identify(sig->return_type()));
|
||||
if (sig->count() > 0) {
|
||||
print(" arguments='");
|
||||
for (int i = 0; i < sig->count(); i++) {
|
||||
print((i == 0) ? "%d" : " %d", identify(sig->type_at(i)));
|
||||
}
|
||||
print("'");
|
||||
}
|
||||
if (!method->is_loaded()) {
|
||||
print(" unloaded='1'");
|
||||
} else {
|
||||
print(" flags='%d'", (jchar) method->flags().as_int());
|
||||
// output a few metrics
|
||||
print(" bytes='%d'", method->code_size());
|
||||
method->log_nmethod_identity(this);
|
||||
//print(" count='%d'", method->invocation_count());
|
||||
//int bec = method->backedge_count();
|
||||
//if (bec != 0) print(" backedge_count='%d'", bec);
|
||||
print(" iicount='%d'", method->interpreter_invocation_count());
|
||||
}
|
||||
end_elem();
|
||||
} else if (mobj->is_type()) {
|
||||
BasicType type = mobj->as_type()->basic_type();
|
||||
elem("type id='%d' name='%s'", id, type2name(type));
|
||||
|
@ -692,30 +692,18 @@ void Method::set_signature_handler(address handler) {
|
||||
}
|
||||
|
||||
|
||||
bool Method::is_not_compilable(int comp_level) const {
|
||||
if (number_of_breakpoints() > 0) {
|
||||
return true;
|
||||
}
|
||||
if (is_method_handle_intrinsic()) {
|
||||
return !is_synthetic(); // the generated adapters must be compiled
|
||||
}
|
||||
if (comp_level == CompLevel_any) {
|
||||
return is_not_c1_compilable() || is_not_c2_compilable();
|
||||
}
|
||||
if (is_c1_compile(comp_level)) {
|
||||
return is_not_c1_compilable();
|
||||
}
|
||||
if (is_c2_compile(comp_level)) {
|
||||
return is_not_c2_compilable();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// call this when compiler finds that this method is not compilable
|
||||
void Method::set_not_compilable(int comp_level, bool report) {
|
||||
void Method::print_made_not_compilable(int comp_level, bool is_osr, bool report) {
|
||||
if (PrintCompilation && report) {
|
||||
ttyLocker ttyl;
|
||||
tty->print("made not compilable ");
|
||||
tty->print("made not %scompilable on ", is_osr ? "OSR " : "");
|
||||
if (comp_level == CompLevel_all) {
|
||||
tty->print("all levels ");
|
||||
} else {
|
||||
tty->print("levels ");
|
||||
for (int i = (int)CompLevel_none; i <= comp_level; i++) {
|
||||
tty->print("%d ", i);
|
||||
}
|
||||
}
|
||||
this->print_short_name(tty);
|
||||
int size = this->code_size();
|
||||
if (size > 0)
|
||||
@ -724,21 +712,64 @@ void Method::set_not_compilable(int comp_level, bool report) {
|
||||
}
|
||||
if ((TraceDeoptimization || LogCompilation) && (xtty != NULL)) {
|
||||
ttyLocker ttyl;
|
||||
xtty->begin_elem("make_not_compilable thread='%d'", (int) os::current_thread_id());
|
||||
xtty->begin_elem("make_not_%scompilable thread='%d'", is_osr ? "osr_" : "", (int) os::current_thread_id());
|
||||
xtty->method(this);
|
||||
xtty->stamp();
|
||||
xtty->end_elem();
|
||||
}
|
||||
}
|
||||
|
||||
bool Method::is_not_compilable(int comp_level) const {
|
||||
if (number_of_breakpoints() > 0)
|
||||
return true;
|
||||
if (is_method_handle_intrinsic())
|
||||
return !is_synthetic(); // the generated adapters must be compiled
|
||||
if (comp_level == CompLevel_any)
|
||||
return is_not_c1_compilable() || is_not_c2_compilable();
|
||||
if (is_c1_compile(comp_level))
|
||||
return is_not_c1_compilable();
|
||||
if (is_c2_compile(comp_level))
|
||||
return is_not_c2_compilable();
|
||||
return false;
|
||||
}
|
||||
|
||||
// call this when compiler finds that this method is not compilable
|
||||
void Method::set_not_compilable(int comp_level, bool report) {
|
||||
print_made_not_compilable(comp_level, /*is_osr*/ false, report);
|
||||
if (comp_level == CompLevel_all) {
|
||||
set_not_c1_compilable();
|
||||
set_not_c2_compilable();
|
||||
} else {
|
||||
if (is_c1_compile(comp_level)) {
|
||||
if (is_c1_compile(comp_level))
|
||||
set_not_c1_compilable();
|
||||
} else
|
||||
if (is_c2_compile(comp_level)) {
|
||||
set_not_c2_compilable();
|
||||
}
|
||||
if (is_c2_compile(comp_level))
|
||||
set_not_c2_compilable();
|
||||
}
|
||||
CompilationPolicy::policy()->disable_compilation(this);
|
||||
}
|
||||
|
||||
bool Method::is_not_osr_compilable(int comp_level) const {
|
||||
if (is_not_compilable(comp_level))
|
||||
return true;
|
||||
if (comp_level == CompLevel_any)
|
||||
return is_not_c1_osr_compilable() || is_not_c2_osr_compilable();
|
||||
if (is_c1_compile(comp_level))
|
||||
return is_not_c1_osr_compilable();
|
||||
if (is_c2_compile(comp_level))
|
||||
return is_not_c2_osr_compilable();
|
||||
return false;
|
||||
}
|
||||
|
||||
void Method::set_not_osr_compilable(int comp_level, bool report) {
|
||||
print_made_not_compilable(comp_level, /*is_osr*/ true, report);
|
||||
if (comp_level == CompLevel_all) {
|
||||
set_not_c1_osr_compilable();
|
||||
set_not_c2_osr_compilable();
|
||||
} else {
|
||||
if (is_c1_compile(comp_level))
|
||||
set_not_c1_osr_compilable();
|
||||
if (is_c2_compile(comp_level))
|
||||
set_not_c2_osr_compilable();
|
||||
}
|
||||
CompilationPolicy::policy()->disable_compilation(this);
|
||||
}
|
||||
|
@ -745,19 +745,30 @@ class Method : public Metadata {
|
||||
// Indicates whether compilation failed earlier for this method, or
|
||||
// whether it is not compilable for another reason like having a
|
||||
// breakpoint set in it.
|
||||
bool is_not_compilable(int comp_level = CompLevel_any) const;
|
||||
bool is_not_compilable(int comp_level = CompLevel_any) const;
|
||||
void set_not_compilable(int comp_level = CompLevel_all, bool report = true);
|
||||
void set_not_compilable_quietly(int comp_level = CompLevel_all) {
|
||||
set_not_compilable(comp_level, false);
|
||||
}
|
||||
bool is_not_osr_compilable(int comp_level = CompLevel_any) const {
|
||||
return is_not_compilable(comp_level) || access_flags().is_not_osr_compilable();
|
||||
bool is_not_osr_compilable(int comp_level = CompLevel_any) const;
|
||||
void set_not_osr_compilable(int comp_level = CompLevel_all, bool report = true);
|
||||
void set_not_osr_compilable_quietly(int comp_level = CompLevel_all) {
|
||||
set_not_osr_compilable(comp_level, false);
|
||||
}
|
||||
void set_not_osr_compilable() { _access_flags.set_not_osr_compilable(); }
|
||||
bool is_not_c1_compilable() const { return access_flags().is_not_c1_compilable(); }
|
||||
void set_not_c1_compilable() { _access_flags.set_not_c1_compilable(); }
|
||||
bool is_not_c2_compilable() const { return access_flags().is_not_c2_compilable(); }
|
||||
void set_not_c2_compilable() { _access_flags.set_not_c2_compilable(); }
|
||||
|
||||
private:
|
||||
void print_made_not_compilable(int comp_level, bool is_osr, bool report);
|
||||
|
||||
public:
|
||||
bool is_not_c1_compilable() const { return access_flags().is_not_c1_compilable(); }
|
||||
void set_not_c1_compilable() { _access_flags.set_not_c1_compilable(); }
|
||||
bool is_not_c2_compilable() const { return access_flags().is_not_c2_compilable(); }
|
||||
void set_not_c2_compilable() { _access_flags.set_not_c2_compilable(); }
|
||||
|
||||
bool is_not_c1_osr_compilable() const { return is_not_c1_compilable(); } // don't waste an accessFlags bit
|
||||
void set_not_c1_osr_compilable() { set_not_c1_compilable(); } // don't waste an accessFlags bit
|
||||
bool is_not_c2_osr_compilable() const { return access_flags().is_not_c2_osr_compilable(); }
|
||||
void set_not_c2_osr_compilable() { _access_flags.set_not_c2_osr_compilable(); }
|
||||
|
||||
// Background compilation support
|
||||
bool queued_for_compilation() const { return access_flags().queued_for_compilation(); }
|
||||
|
@ -30,12 +30,12 @@
|
||||
// Print an event.
|
||||
void AdvancedThresholdPolicy::print_specific(EventType type, methodHandle mh, methodHandle imh,
|
||||
int bci, CompLevel level) {
|
||||
tty->print(" rate: ");
|
||||
tty->print(" rate=");
|
||||
if (mh->prev_time() == 0) tty->print("n/a");
|
||||
else tty->print("%f", mh->rate());
|
||||
|
||||
tty->print(" k: %.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback),
|
||||
threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback));
|
||||
tty->print(" k=%.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback),
|
||||
threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback));
|
||||
|
||||
}
|
||||
|
||||
|
@ -394,28 +394,27 @@ void NonTieredCompPolicy::trace_osr_request(methodHandle method, nmethod* osr, i
|
||||
// SimpleCompPolicy - compile current method
|
||||
|
||||
void SimpleCompPolicy::method_invocation_event(methodHandle m, JavaThread* thread) {
|
||||
int hot_count = m->invocation_count();
|
||||
const int comp_level = CompLevel_highest_tier;
|
||||
const int hot_count = m->invocation_count();
|
||||
reset_counter_for_invocation_event(m);
|
||||
const char* comment = "count";
|
||||
|
||||
if (is_compilation_enabled() && can_be_compiled(m)) {
|
||||
nmethod* nm = m->code();
|
||||
if (nm == NULL ) {
|
||||
const char* comment = "count";
|
||||
CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_highest_tier,
|
||||
m, hot_count, comment, thread);
|
||||
CompileBroker::compile_method(m, InvocationEntryBci, comp_level, m, hot_count, comment, thread);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SimpleCompPolicy::method_back_branch_event(methodHandle m, int bci, JavaThread* thread) {
|
||||
int hot_count = m->backedge_count();
|
||||
const int comp_level = CompLevel_highest_tier;
|
||||
const int hot_count = m->backedge_count();
|
||||
const char* comment = "backedge_count";
|
||||
|
||||
if (is_compilation_enabled() && !m->is_not_osr_compilable() && can_be_compiled(m)) {
|
||||
CompileBroker::compile_method(m, bci, CompLevel_highest_tier,
|
||||
m, hot_count, comment, thread);
|
||||
NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, CompLevel_highest_tier, true));)
|
||||
if (is_compilation_enabled() && !m->is_not_osr_compilable(comp_level) && can_be_compiled(m)) {
|
||||
CompileBroker::compile_method(m, bci, comp_level, m, hot_count, comment, thread);
|
||||
NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, comp_level, true));)
|
||||
}
|
||||
}
|
||||
// StackWalkCompPolicy - walk up stack to find a suitable method to compile
|
||||
@ -426,7 +425,8 @@ const char* StackWalkCompPolicy::_msg = NULL;
|
||||
|
||||
// Consider m for compilation
|
||||
void StackWalkCompPolicy::method_invocation_event(methodHandle m, JavaThread* thread) {
|
||||
int hot_count = m->invocation_count();
|
||||
const int comp_level = CompLevel_highest_tier;
|
||||
const int hot_count = m->invocation_count();
|
||||
reset_counter_for_invocation_event(m);
|
||||
const char* comment = "count";
|
||||
|
||||
@ -457,20 +457,20 @@ void StackWalkCompPolicy::method_invocation_event(methodHandle m, JavaThread* th
|
||||
if (TimeCompilationPolicy) accumulated_time()->stop();
|
||||
assert(top != NULL, "findTopInlinableFrame returned null");
|
||||
if (TraceCompilationPolicy) top->print();
|
||||
CompileBroker::compile_method(top->top_method(), InvocationEntryBci, CompLevel_highest_tier,
|
||||
CompileBroker::compile_method(top->top_method(), InvocationEntryBci, comp_level,
|
||||
m, hot_count, comment, thread);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void StackWalkCompPolicy::method_back_branch_event(methodHandle m, int bci, JavaThread* thread) {
|
||||
int hot_count = m->backedge_count();
|
||||
const int comp_level = CompLevel_highest_tier;
|
||||
const int hot_count = m->backedge_count();
|
||||
const char* comment = "backedge_count";
|
||||
|
||||
if (is_compilation_enabled() && !m->is_not_osr_compilable() && can_be_compiled(m)) {
|
||||
CompileBroker::compile_method(m, bci, CompLevel_highest_tier, m, hot_count, comment, thread);
|
||||
|
||||
NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, CompLevel_highest_tier, true));)
|
||||
if (is_compilation_enabled() && !m->is_not_osr_compilable(comp_level) && can_be_compiled(m)) {
|
||||
CompileBroker::compile_method(m, bci, comp_level, m, hot_count, comment, thread);
|
||||
NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, comp_level, true));)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,11 +43,11 @@ void SimpleThresholdPolicy::print_counters(const char* prefix, methodHandle mh)
|
||||
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,
|
||||
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,
|
||||
tty->print(" %smax levels=%d,%d", prefix,
|
||||
mh->highest_comp_level(), mh->highest_osr_comp_level());
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodH
|
||||
tty->print("unknown");
|
||||
}
|
||||
|
||||
tty->print(" level: %d ", level);
|
||||
tty->print(" level=%d ", level);
|
||||
|
||||
ResourceMark rm;
|
||||
char *method_name = mh->name_and_sig_as_C_string();
|
||||
@ -95,8 +95,8 @@ void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodH
|
||||
tty->print(" [%s]] ", inlinee_name);
|
||||
}
|
||||
else tty->print("] ");
|
||||
tty->print("@%d queues: %d,%d", bci, CompileBroker::queue_size(CompLevel_full_profile),
|
||||
CompileBroker::queue_size(CompLevel_full_optimization));
|
||||
tty->print("@%d queues=%d,%d", bci, CompileBroker::queue_size(CompLevel_full_profile),
|
||||
CompileBroker::queue_size(CompLevel_full_optimization));
|
||||
|
||||
print_specific(type, mh, imh, bci, level);
|
||||
|
||||
@ -105,25 +105,30 @@ void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodH
|
||||
if (inlinee_event) {
|
||||
print_counters("inlinee ", imh);
|
||||
}
|
||||
tty->print(" compilable: ");
|
||||
tty->print(" compilable=");
|
||||
bool need_comma = false;
|
||||
if (!mh->is_not_compilable(CompLevel_full_profile)) {
|
||||
tty->print("c1");
|
||||
need_comma = true;
|
||||
}
|
||||
if (!mh->is_not_osr_compilable(CompLevel_full_profile)) {
|
||||
if (need_comma) tty->print(",");
|
||||
tty->print("c1-osr");
|
||||
need_comma = true;
|
||||
}
|
||||
if (!mh->is_not_compilable(CompLevel_full_optimization)) {
|
||||
if (need_comma) tty->print(", ");
|
||||
if (need_comma) tty->print(",");
|
||||
tty->print("c2");
|
||||
need_comma = true;
|
||||
}
|
||||
if (!mh->is_not_osr_compilable()) {
|
||||
if (need_comma) tty->print(", ");
|
||||
tty->print("osr");
|
||||
if (!mh->is_not_osr_compilable(CompLevel_full_optimization)) {
|
||||
if (need_comma) tty->print(",");
|
||||
tty->print("c2-osr");
|
||||
}
|
||||
tty->print(" status:");
|
||||
tty->print(" status=");
|
||||
if (mh->queued_for_compilation()) {
|
||||
tty->print(" in queue");
|
||||
} else tty->print(" idle");
|
||||
tty->print("in-queue");
|
||||
} else tty->print("idle");
|
||||
}
|
||||
tty->print_cr("]");
|
||||
}
|
||||
@ -223,7 +228,7 @@ void SimpleThresholdPolicy::compile(methodHandle mh, int bci, CompLevel level, J
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (bci != InvocationEntryBci && mh->is_not_osr_compilable()) {
|
||||
if (bci != InvocationEntryBci && mh->is_not_osr_compilable(level)) {
|
||||
return;
|
||||
}
|
||||
if (!CompileBroker::compilation_is_in_queue(mh, bci)) {
|
||||
|
@ -2182,7 +2182,7 @@ typedef TwoOopHashtable<Symbol*, mtClass> SymbolTwoOopHashtable;
|
||||
declare_constant(JVM_ACC_HAS_LOOPS) \
|
||||
declare_constant(JVM_ACC_LOOPS_FLAG_INIT) \
|
||||
declare_constant(JVM_ACC_QUEUED) \
|
||||
declare_constant(JVM_ACC_NOT_OSR_COMPILABLE) \
|
||||
declare_constant(JVM_ACC_NOT_C2_OSR_COMPILABLE) \
|
||||
declare_constant(JVM_ACC_HAS_LINE_NUMBER_TABLE) \
|
||||
declare_constant(JVM_ACC_HAS_CHECKED_EXCEPTIONS) \
|
||||
declare_constant(JVM_ACC_HAS_JSRS) \
|
||||
|
@ -47,7 +47,7 @@ enum {
|
||||
JVM_ACC_QUEUED = 0x01000000, // Queued for compilation
|
||||
JVM_ACC_NOT_C2_COMPILABLE = 0x02000000,
|
||||
JVM_ACC_NOT_C1_COMPILABLE = 0x04000000,
|
||||
JVM_ACC_NOT_OSR_COMPILABLE = 0x08000000,
|
||||
JVM_ACC_NOT_C2_OSR_COMPILABLE = 0x08000000,
|
||||
JVM_ACC_HAS_LINE_NUMBER_TABLE = 0x00100000,
|
||||
JVM_ACC_HAS_CHECKED_EXCEPTIONS = 0x00400000,
|
||||
JVM_ACC_HAS_JSRS = 0x00800000,
|
||||
@ -121,9 +121,9 @@ class AccessFlags VALUE_OBJ_CLASS_SPEC {
|
||||
bool has_loops () const { return (_flags & JVM_ACC_HAS_LOOPS ) != 0; }
|
||||
bool loops_flag_init () const { return (_flags & JVM_ACC_LOOPS_FLAG_INIT ) != 0; }
|
||||
bool queued_for_compilation () const { return (_flags & JVM_ACC_QUEUED ) != 0; }
|
||||
bool is_not_c1_compilable () const { return (_flags & JVM_ACC_NOT_C1_COMPILABLE ) != 0; }
|
||||
bool is_not_c2_compilable () const { return (_flags & JVM_ACC_NOT_C2_COMPILABLE ) != 0; }
|
||||
bool is_not_osr_compilable () const { return (_flags & JVM_ACC_NOT_OSR_COMPILABLE ) != 0; }
|
||||
bool is_not_c1_compilable () const { return (_flags & JVM_ACC_NOT_C1_COMPILABLE ) != 0; }
|
||||
bool is_not_c2_compilable () const { return (_flags & JVM_ACC_NOT_C2_COMPILABLE ) != 0; }
|
||||
bool is_not_c2_osr_compilable() const { return (_flags & JVM_ACC_NOT_C2_OSR_COMPILABLE ) != 0; }
|
||||
bool has_linenumber_table () const { return (_flags & JVM_ACC_HAS_LINE_NUMBER_TABLE ) != 0; }
|
||||
bool has_checked_exceptions () const { return (_flags & JVM_ACC_HAS_CHECKED_EXCEPTIONS ) != 0; }
|
||||
bool has_jsrs () const { return (_flags & JVM_ACC_HAS_JSRS ) != 0; }
|
||||
@ -186,7 +186,7 @@ class AccessFlags VALUE_OBJ_CLASS_SPEC {
|
||||
void set_loops_flag_init() { atomic_set_bits(JVM_ACC_LOOPS_FLAG_INIT); }
|
||||
void set_not_c1_compilable() { atomic_set_bits(JVM_ACC_NOT_C1_COMPILABLE); }
|
||||
void set_not_c2_compilable() { atomic_set_bits(JVM_ACC_NOT_C2_COMPILABLE); }
|
||||
void set_not_osr_compilable() { atomic_set_bits(JVM_ACC_NOT_OSR_COMPILABLE); }
|
||||
void set_not_c2_osr_compilable() { atomic_set_bits(JVM_ACC_NOT_C2_OSR_COMPILABLE); }
|
||||
void set_has_linenumber_table() { atomic_set_bits(JVM_ACC_HAS_LINE_NUMBER_TABLE); }
|
||||
void set_has_checked_exceptions() { atomic_set_bits(JVM_ACC_HAS_CHECKED_EXCEPTIONS); }
|
||||
void set_has_jsrs() { atomic_set_bits(JVM_ACC_HAS_JSRS); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user