JDK-8059226 : Names of rtm_state_change and unstable_if deoptimization reasons were swapped in 8u40
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8u40
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-09-26
  • Updated: 2015-01-21
  • Resolved: 2014-10-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8u40 b09Fixed
Description
During 8030976 backport into 8u40 names of rtm_state_change and unstable_if deoptimization reasons were swapped, so now rtm_state_change is reported in compilation log as "unstable_if" and unstable_if is reported as "rtm_state_change".

In jdk9 both deopt reasons have correct names.

Affected tests:
compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java
compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java
compiler/rtm/locking/TestRTMLockingCalculationDelay.java
compiler/rtm/locking/TestUseRTMDeopt.java
Comments
ILW=Fix of disabled optimization, currently not used feature, none = LLH=P5
30-09-2014

Vladimir, yes, I will.
26-09-2014

Filipp, will you take care for this fix? Please, assign the bug. Your suggested fix is fine.
26-09-2014

Fix is trivial: diff -r 46ffdf376cb5 src/share/vm/runtime/deoptimization.hpp --- a/src/share/vm/runtime/deoptimization.hpp Fri Sep 26 03:42:38 2014 -0700 +++ b/src/share/vm/runtime/deoptimization.hpp Fri Sep 26 07:22:24 2014 -0700 @@ -60,8 +60,8 @@ Reason_predicate, // compiler generated predicate failed Reason_loop_limit_check, // compiler generated loop limits check failed Reason_speculate_class_check, // saw unexpected object class from type speculation + Reason_rtm_state_change, // rtm state change detected Reason_unstable_if, // a branch predicted always false was taken - Reason_rtm_state_change, // rtm state change detected Reason_LIMIT, // Note: Keep this enum in sync. with _trap_reason_name. Reason_RECORDED_LIMIT = Reason_bimorphic // some are not recorded per bc
26-09-2014