--- old/src/share/vm/runtime/deoptimization.cpp 2015-06-10 14:57:29.000000000 +0300 +++ new/src/share/vm/runtime/deoptimization.cpp 2015-06-10 14:57:29.000000000 +0300 @@ -1460,7 +1460,11 @@ // // The other actions cause immediate removal of the present code. - bool update_trap_state = (reason != Reason_tenured); + // Traps caused by injected profile shouldn't pollute trap counts. + bool injected_profile_trap = trap_method->has_injected_profile() && + (reason == Reason_intrinsic || reason == Reason_unreached); + + bool update_trap_state = (reason != Reason_tenured) && !injected_profile_trap; bool make_not_entrant = false; bool make_not_compilable = false; bool reprofile = false;