8006613: adding reason to made_not_compilable

Reviewed-by: kvn, vlivanov
This commit is contained in:
Igor Ignatyev 2013-02-05 08:25:51 -08:00 committed by Vladimir Ivanov
parent da5499f4ed
commit 014d9489bb
7 changed files with 22 additions and 15 deletions

View file

@ -699,7 +699,7 @@ void Method::set_signature_handler(address handler) {
}
void Method::print_made_not_compilable(int comp_level, bool is_osr, bool report) {
void Method::print_made_not_compilable(int comp_level, bool is_osr, bool report, const char* reason) {
if (PrintCompilation && report) {
ttyLocker ttyl;
tty->print("made not %scompilable on ", is_osr ? "OSR " : "");
@ -713,14 +713,21 @@ void Method::print_made_not_compilable(int comp_level, bool is_osr, bool report)
}
this->print_short_name(tty);
int size = this->code_size();
if (size > 0)
if (size > 0) {
tty->print(" (%d bytes)", size);
}
if (reason != NULL) {
tty->print(" %s", reason);
}
tty->cr();
}
if ((TraceDeoptimization || LogCompilation) && (xtty != NULL)) {
ttyLocker ttyl;
xtty->begin_elem("make_not_%scompilable thread='" UINTX_FORMAT "'",
is_osr ? "osr_" : "", os::current_thread_id());
if (reason != NULL) {
xtty->print(" reason=\'%s\'", reason);
}
xtty->method(this);
xtty->stamp();
xtty->end_elem();
@ -742,8 +749,8 @@ bool Method::is_not_compilable(int comp_level) const {
}
// 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);
void Method::set_not_compilable(int comp_level, bool report, const char* reason) {
print_made_not_compilable(comp_level, /*is_osr*/ false, report, reason);
if (comp_level == CompLevel_all) {
set_not_c1_compilable();
set_not_c2_compilable();
@ -768,8 +775,8 @@ bool Method::is_not_osr_compilable(int comp_level) const {
return false;
}
void Method::set_not_osr_compilable(int comp_level, bool report) {
print_made_not_compilable(comp_level, /*is_osr*/ true, report);
void Method::set_not_osr_compilable(int comp_level, bool report, const char* reason) {
print_made_not_compilable(comp_level, /*is_osr*/ true, report, reason);
if (comp_level == CompLevel_all) {
set_not_c1_osr_compilable();
set_not_c2_osr_compilable();