hotspot/src/share/vm/runtime/deoptimization.cpp
changeset 31593 7b9e292896d2
parent 31592 43f48e165466
parent 31228 8e427370cdd1
child 33160 c59f1676d27e
child 33148 68fa8b6c4340
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp	Wed Jun 24 12:12:25 2015 -0400
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp	Wed Jun 24 21:58:05 2015 -0400
@@ -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;