src/share/vm/oops/method.cpp

changeset 4541
d05ff4bf41b3
parent 4497
16fb9f942703
parent 4539
6a51fc70a15e
child 4566
461a3adac4d1
     1.1 --- a/src/share/vm/oops/method.cpp	Wed Feb 06 15:22:32 2013 -0800
     1.2 +++ b/src/share/vm/oops/method.cpp	Thu Feb 07 12:23:51 2013 -0800
     1.3 @@ -700,7 +700,7 @@
     1.4  }
     1.5  
     1.6  
     1.7 -void Method::print_made_not_compilable(int comp_level, bool is_osr, bool report) {
     1.8 +void Method::print_made_not_compilable(int comp_level, bool is_osr, bool report, const char* reason) {
     1.9    if (PrintCompilation && report) {
    1.10      ttyLocker ttyl;
    1.11      tty->print("made not %scompilable on ", is_osr ? "OSR " : "");
    1.12 @@ -714,14 +714,21 @@
    1.13      }
    1.14      this->print_short_name(tty);
    1.15      int size = this->code_size();
    1.16 -    if (size > 0)
    1.17 +    if (size > 0) {
    1.18        tty->print(" (%d bytes)", size);
    1.19 +    }
    1.20 +    if (reason != NULL) {
    1.21 +      tty->print("   %s", reason);
    1.22 +    }
    1.23      tty->cr();
    1.24    }
    1.25    if ((TraceDeoptimization || LogCompilation) && (xtty != NULL)) {
    1.26      ttyLocker ttyl;
    1.27      xtty->begin_elem("make_not_%scompilable thread='" UINTX_FORMAT "'",
    1.28                       is_osr ? "osr_" : "", os::current_thread_id());
    1.29 +    if (reason != NULL) {
    1.30 +      xtty->print(" reason=\'%s\'", reason);
    1.31 +    }
    1.32      xtty->method(this);
    1.33      xtty->stamp();
    1.34      xtty->end_elem();
    1.35 @@ -743,8 +750,8 @@
    1.36  }
    1.37  
    1.38  // call this when compiler finds that this method is not compilable
    1.39 -void Method::set_not_compilable(int comp_level, bool report) {
    1.40 -  print_made_not_compilable(comp_level, /*is_osr*/ false, report);
    1.41 +void Method::set_not_compilable(int comp_level, bool report, const char* reason) {
    1.42 +  print_made_not_compilable(comp_level, /*is_osr*/ false, report, reason);
    1.43    if (comp_level == CompLevel_all) {
    1.44      set_not_c1_compilable();
    1.45      set_not_c2_compilable();
    1.46 @@ -769,8 +776,8 @@
    1.47    return false;
    1.48  }
    1.49  
    1.50 -void Method::set_not_osr_compilable(int comp_level, bool report) {
    1.51 -  print_made_not_compilable(comp_level, /*is_osr*/ true, report);
    1.52 +void Method::set_not_osr_compilable(int comp_level, bool report, const char* reason) {
    1.53 +  print_made_not_compilable(comp_level, /*is_osr*/ true, report, reason);
    1.54    if (comp_level == CompLevel_all) {
    1.55      set_not_c1_osr_compilable();
    1.56      set_not_c2_osr_compilable();

mercurial