-
Enhancement
-
Resolution: Fixed
-
P4
-
17, 21, 23, 24
-
b20
-
ppc
-
generic
The ObjectMonitor::_owner check in MacroAssembler::compiler_fast_unlock_object() [1] is redundant and should be removed because java code with unbalanced locking is never compiled to nmethods.
ObjectMonitor::_owner can be a stack address with LM_LEGACY [3]. In that case the result of the check is wrong. Execution will take unnecessarily the slow path.
[1] Redundant check: https://github.com/openjdk/jdk/blob/20f36c666c30e50c446d09cca4ea52395317a7eb/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp#L2700-L2705
[2] ciMethod::has_balanced_monitors() https://github.com/openjdk/jdk/blob/7a1e832ea997f9984eb5fc18474a8f1650ddb1bf/src/hotspot/share/ci/ciMethod.cpp#L290
[3] _owner can be a stack address: https://github.com/openjdk/jdk/blob/a601cd2e100958e3f37ae65e32e4b3cac246c079/src/hotspot/share/runtime/synchronizer.cpp#L1530
ObjectMonitor::_owner can be a stack address with LM_LEGACY [3]. In that case the result of the check is wrong. Execution will take unnecessarily the slow path.
[1] Redundant check: https://github.com/openjdk/jdk/blob/20f36c666c30e50c446d09cca4ea52395317a7eb/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp#L2700-L2705
[2] ciMethod::has_balanced_monitors() https://github.com/openjdk/jdk/blob/7a1e832ea997f9984eb5fc18474a8f1650ddb1bf/src/hotspot/share/ci/ciMethod.cpp#L290
[3] _owner can be a stack address: https://github.com/openjdk/jdk/blob/a601cd2e100958e3f37ae65e32e4b3cac246c079/src/hotspot/share/runtime/synchronizer.cpp#L1530
- links to
-
Commit(master) openjdk/jdk/f9208fad
-
Review(master) openjdk/jdk/21494