# HG changeset patch # User iveresov # Date 1410286824 0 # Node ID 2d9cef76b5a619728e9158015f491127b0031e17 # Parent e09c0676c53fd92175baeba9214080112d23d6fd# Parent 2e6106d44079dd313a6c0e82df744f0b20bc618c Merge diff -r e09c0676c53f -r 2d9cef76b5a6 src/share/vm/classfile/classLoader.cpp --- a/src/share/vm/classfile/classLoader.cpp Wed Sep 03 14:39:13 2014 +0200 +++ b/src/share/vm/classfile/classLoader.cpp Tue Sep 09 18:20:24 2014 +0000 @@ -1609,7 +1609,7 @@ if (TieredCompilation && TieredStopAtLevel >= CompLevel_full_optimization) { // Clobber the first compile and force second tier compilation nmethod* nm = m->code(); - if (nm != NULL) { + if (nm != NULL && !m->is_method_handle_intrinsic()) { // Throw out the code so that the code cache doesn't fill up nm->make_not_entrant(); m->clear_code(); @@ -1628,7 +1628,7 @@ } nmethod* nm = m->code(); - if (nm != NULL) { + if (nm != NULL && !m->is_method_handle_intrinsic()) { // Throw out the code so that the code cache doesn't fill up nm->make_not_entrant(); m->clear_code(); diff -r e09c0676c53f -r 2d9cef76b5a6 src/share/vm/classfile/systemDictionary.cpp --- a/src/share/vm/classfile/systemDictionary.cpp Wed Sep 03 14:39:13 2014 +0200 +++ b/src/share/vm/classfile/systemDictionary.cpp Tue Sep 09 18:20:24 2014 +0000 @@ -2291,6 +2291,9 @@ } assert(spe != NULL && spe->method() != NULL, ""); + assert(!UseCompiler || (spe->method()->has_compiled_code() && + spe->method()->code()->entry_point() == spe->method()->from_compiled_entry()), + "MH intrinsic invariant"); return spe->method(); } diff -r e09c0676c53f -r 2d9cef76b5a6 src/share/vm/code/codeCache.cpp --- a/src/share/vm/code/codeCache.cpp Wed Sep 03 14:39:13 2014 +0200 +++ b/src/share/vm/code/codeCache.cpp Tue Sep 09 18:20:24 2014 +0000 @@ -712,7 +712,9 @@ void CodeCache::mark_all_nmethods_for_deoptimization() { MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); FOR_ALL_ALIVE_NMETHODS(nm) { - nm->mark_for_deoptimization(); + if (!nm->method()->is_method_handle_intrinsic()) { + nm->mark_for_deoptimization(); + } } } diff -r e09c0676c53f -r 2d9cef76b5a6 src/share/vm/code/compiledIC.cpp --- a/src/share/vm/code/compiledIC.cpp Wed Sep 03 14:39:13 2014 +0200 +++ b/src/share/vm/code/compiledIC.cpp Tue Sep 09 18:20:24 2014 +0000 @@ -595,6 +595,7 @@ } else { // Callee is interpreted code. In any case entering the interpreter // puts a converter-frame on the stack to save arguments. + assert(!m->is_method_handle_intrinsic(), "Compiled code should never call interpreter MH intrinsics"); info._to_interpreter = true; info._entry = m()->get_c2i_entry(); } diff -r e09c0676c53f -r 2d9cef76b5a6 src/share/vm/code/nmethod.hpp --- a/src/share/vm/code/nmethod.hpp Wed Sep 03 14:39:13 2014 +0200 +++ b/src/share/vm/code/nmethod.hpp Tue Sep 09 18:20:24 2014 +0000 @@ -448,7 +448,10 @@ // alive. It is used when an uncommon trap happens. Returns true // if this thread changed the state of the nmethod or false if // another thread performed the transition. - bool make_not_entrant() { return make_not_entrant_or_zombie(not_entrant); } + bool make_not_entrant() { + assert(!method()->is_method_handle_intrinsic(), "Cannot make MH intrinsic not entrant"); + return make_not_entrant_or_zombie(not_entrant); + } bool make_zombie() { return make_not_entrant_or_zombie(zombie); } // used by jvmti to track if the unload event has been reported