Integrated: 8296170: Refactor stack-locking path in C2_MacroAssembler::fast_unlock()

Roman Kennke rkennke at openjdk.org
Thu Nov 17 08:26:59 UTC 2022


On Tue, 1 Nov 2022 15:37:16 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> The code in C2_MacroAssembler::fast_unlock() has several (minor) issues: 
>  - The stack-locking path for x86_32 is not under UseHeavyMonitors - it would be executed even when stack-locking is disabled. 
>  - The stack-locking paths are the same for x86_32 and x86_64 - they can be merged into a common path. 
>  - In x86_32 path, we call get_thread(boxReg) which is totally bogus because we clear boxReg right afterwards with xorptr(boxReg, boxReg). 
>  - In x86_32 path, the CheckSucc label is identical to the DONE label, and in-fact CheckSucc is only ever really used in the x86_64 path and can be moved there.
> 
> Testing:
>  - [x] tier1 (x86_32, x86_64)
>  - [x] tier2 (x86_32, x86_64)

This pull request has now been integrated.

Changeset: e81359f1
Author:    Roman Kennke <rkennke at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e81359f14802ef520ad4dbb01202a74313c9dc7f
Stats:     31 lines in 1 file changed: 2 ins; 26 del; 3 mod

8296170: Refactor stack-locking path in C2_MacroAssembler::fast_unlock()

Reviewed-by: thartmann, phh

-------------

PR: https://git.openjdk.org/jdk/pull/10936


More information about the hotspot-compiler-dev mailing list