# HG changeset patch # User adlertz # Date 1378057922 -7200 # Node ID 40ed2dc92a797730cda76b4f2560e181b66c5428 # Parent 4b078f877b5640a2c3d6c30fc2a9f1217aa92895# Parent 8947af8a9cec0bdc505faee911216311e3468369 Merge diff -r 4b078f877b56 -r 40ed2dc92a79 src/share/vm/oops/method.cpp --- a/src/share/vm/oops/method.cpp Sun Sep 01 19:21:05 2013 +0200 +++ b/src/share/vm/oops/method.cpp Sun Sep 01 19:52:02 2013 +0200 @@ -720,11 +720,22 @@ } } +bool Method::is_always_compilable() const { + // Generated adapters must be compiled + if (is_method_handle_intrinsic() && is_synthetic()) { + assert(!is_not_c1_compilable(), "sanity check"); + assert(!is_not_c2_compilable(), "sanity check"); + return true; + } + + return false; +} + 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 (is_always_compilable()) + return false; if (comp_level == CompLevel_any) return is_not_c1_compilable() || is_not_c2_compilable(); if (is_c1_compile(comp_level)) @@ -736,6 +747,10 @@ // call this when compiler finds that this method is not compilable void Method::set_not_compilable(int comp_level, bool report, const char* reason) { + if (is_always_compilable()) { + // Don't mark a method which should be always compilable + return; + } print_made_not_compilable(comp_level, /*is_osr*/ false, report, reason); if (comp_level == CompLevel_all) { set_not_c1_compilable(); diff -r 4b078f877b56 -r 40ed2dc92a79 src/share/vm/oops/method.hpp --- a/src/share/vm/oops/method.hpp Sun Sep 01 19:21:05 2013 +0200 +++ b/src/share/vm/oops/method.hpp Sun Sep 01 19:52:02 2013 +0200 @@ -796,6 +796,7 @@ void set_not_osr_compilable_quietly(int comp_level = CompLevel_all) { set_not_osr_compilable(comp_level, false); } + bool is_always_compilable() const; private: void print_made_not_compilable(int comp_level, bool is_osr, bool report, const char* reason);