Thu, 29 Aug 2013 22:44:19 +0400
8023976: assert(!CompilationPolicy::can_be_compiled(this, comp_level)) failed: sanity check
Reviewed-by: kvn, twisti
src/share/vm/oops/method.cpp | file | annotate | diff | comparison | revisions | |
src/share/vm/oops/method.hpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/oops/method.cpp Wed Aug 28 11:22:43 2013 +0200 1.2 +++ b/src/share/vm/oops/method.cpp Thu Aug 29 22:44:19 2013 +0400 1.3 @@ -720,11 +720,22 @@ 1.4 } 1.5 } 1.6 1.7 +bool Method::is_always_compilable() const { 1.8 + // Generated adapters must be compiled 1.9 + if (is_method_handle_intrinsic() && is_synthetic()) { 1.10 + assert(!is_not_c1_compilable(), "sanity check"); 1.11 + assert(!is_not_c2_compilable(), "sanity check"); 1.12 + return true; 1.13 + } 1.14 + 1.15 + return false; 1.16 +} 1.17 + 1.18 bool Method::is_not_compilable(int comp_level) const { 1.19 if (number_of_breakpoints() > 0) 1.20 return true; 1.21 - if (is_method_handle_intrinsic()) 1.22 - return !is_synthetic(); // the generated adapters must be compiled 1.23 + if (is_always_compilable()) 1.24 + return false; 1.25 if (comp_level == CompLevel_any) 1.26 return is_not_c1_compilable() || is_not_c2_compilable(); 1.27 if (is_c1_compile(comp_level)) 1.28 @@ -736,6 +747,10 @@ 1.29 1.30 // call this when compiler finds that this method is not compilable 1.31 void Method::set_not_compilable(int comp_level, bool report, const char* reason) { 1.32 + if (is_always_compilable()) { 1.33 + // Don't mark a method which should be always compilable 1.34 + return; 1.35 + } 1.36 print_made_not_compilable(comp_level, /*is_osr*/ false, report, reason); 1.37 if (comp_level == CompLevel_all) { 1.38 set_not_c1_compilable();
2.1 --- a/src/share/vm/oops/method.hpp Wed Aug 28 11:22:43 2013 +0200 2.2 +++ b/src/share/vm/oops/method.hpp Thu Aug 29 22:44:19 2013 +0400 2.3 @@ -796,6 +796,7 @@ 2.4 void set_not_osr_compilable_quietly(int comp_level = CompLevel_all) { 2.5 set_not_osr_compilable(comp_level, false); 2.6 } 2.7 + bool is_always_compilable() const; 2.8 2.9 private: 2.10 void print_made_not_compilable(int comp_level, bool is_osr, bool report, const char* reason);