Mercurial > hg > graal-compiler
comparison src/share/vm/oops/method.cpp @ 7998:6a51fc70a15e
8006613: adding reason to made_not_compilable
Reviewed-by: kvn, vlivanov
Contributed-by: Igor Ignatyev <igor.ignatyev@oracle.com>
author | vlivanov |
---|---|
date | Tue, 05 Feb 2013 08:25:51 -0800 |
parents | 18c3c3fa291b |
children | d05ff4bf41b3 |
comparison
equal
deleted
inserted
replaced
7997:8bd61471a109 | 7998:6a51fc70a15e |
---|---|
697 address* signature_handler = signature_handler_addr(); | 697 address* signature_handler = signature_handler_addr(); |
698 *signature_handler = handler; | 698 *signature_handler = handler; |
699 } | 699 } |
700 | 700 |
701 | 701 |
702 void Method::print_made_not_compilable(int comp_level, bool is_osr, bool report) { | 702 void Method::print_made_not_compilable(int comp_level, bool is_osr, bool report, const char* reason) { |
703 if (PrintCompilation && report) { | 703 if (PrintCompilation && report) { |
704 ttyLocker ttyl; | 704 ttyLocker ttyl; |
705 tty->print("made not %scompilable on ", is_osr ? "OSR " : ""); | 705 tty->print("made not %scompilable on ", is_osr ? "OSR " : ""); |
706 if (comp_level == CompLevel_all) { | 706 if (comp_level == CompLevel_all) { |
707 tty->print("all levels "); | 707 tty->print("all levels "); |
711 tty->print("%d ", i); | 711 tty->print("%d ", i); |
712 } | 712 } |
713 } | 713 } |
714 this->print_short_name(tty); | 714 this->print_short_name(tty); |
715 int size = this->code_size(); | 715 int size = this->code_size(); |
716 if (size > 0) | 716 if (size > 0) { |
717 tty->print(" (%d bytes)", size); | 717 tty->print(" (%d bytes)", size); |
718 } | |
719 if (reason != NULL) { | |
720 tty->print(" %s", reason); | |
721 } | |
718 tty->cr(); | 722 tty->cr(); |
719 } | 723 } |
720 if ((TraceDeoptimization || LogCompilation) && (xtty != NULL)) { | 724 if ((TraceDeoptimization || LogCompilation) && (xtty != NULL)) { |
721 ttyLocker ttyl; | 725 ttyLocker ttyl; |
722 xtty->begin_elem("make_not_%scompilable thread='" UINTX_FORMAT "'", | 726 xtty->begin_elem("make_not_%scompilable thread='" UINTX_FORMAT "'", |
723 is_osr ? "osr_" : "", os::current_thread_id()); | 727 is_osr ? "osr_" : "", os::current_thread_id()); |
728 if (reason != NULL) { | |
729 xtty->print(" reason=\'%s\'", reason); | |
730 } | |
724 xtty->method(this); | 731 xtty->method(this); |
725 xtty->stamp(); | 732 xtty->stamp(); |
726 xtty->end_elem(); | 733 xtty->end_elem(); |
727 } | 734 } |
728 } | 735 } |
740 return is_not_c2_compilable(); | 747 return is_not_c2_compilable(); |
741 return false; | 748 return false; |
742 } | 749 } |
743 | 750 |
744 // call this when compiler finds that this method is not compilable | 751 // call this when compiler finds that this method is not compilable |
745 void Method::set_not_compilable(int comp_level, bool report) { | 752 void Method::set_not_compilable(int comp_level, bool report, const char* reason) { |
746 print_made_not_compilable(comp_level, /*is_osr*/ false, report); | 753 print_made_not_compilable(comp_level, /*is_osr*/ false, report, reason); |
747 if (comp_level == CompLevel_all) { | 754 if (comp_level == CompLevel_all) { |
748 set_not_c1_compilable(); | 755 set_not_c1_compilable(); |
749 set_not_c2_compilable(); | 756 set_not_c2_compilable(); |
750 } else { | 757 } else { |
751 if (is_c1_compile(comp_level)) | 758 if (is_c1_compile(comp_level)) |
766 if (is_c2_compile(comp_level)) | 773 if (is_c2_compile(comp_level)) |
767 return is_not_c2_osr_compilable(); | 774 return is_not_c2_osr_compilable(); |
768 return false; | 775 return false; |
769 } | 776 } |
770 | 777 |
771 void Method::set_not_osr_compilable(int comp_level, bool report) { | 778 void Method::set_not_osr_compilable(int comp_level, bool report, const char* reason) { |
772 print_made_not_compilable(comp_level, /*is_osr*/ true, report); | 779 print_made_not_compilable(comp_level, /*is_osr*/ true, report, reason); |
773 if (comp_level == CompLevel_all) { | 780 if (comp_level == CompLevel_all) { |
774 set_not_c1_osr_compilable(); | 781 set_not_c1_osr_compilable(); |
775 set_not_c2_osr_compilable(); | 782 set_not_c2_osr_compilable(); |
776 } else { | 783 } else { |
777 if (is_c1_compile(comp_level)) | 784 if (is_c1_compile(comp_level)) |