Integrated: 8316179: Use consistent naming for lightweight locking in MacroAssembler
Stefan Karlsson
stefank at openjdk.org
Thu Sep 14 07:05:30 UTC 2023
On Wed, 13 Sep 2023 11:00:13 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> Different platforms uses different names for the `MacroAssembler` functions that implement the lightweight fast locking/unlocking code. I propose that we use consistent naming for all platforms.
>
> These are the current names for the lightweight-locking functions:
> * AArch64, ppc, riscv: `fast_lock`
> * x86: `fast_lock_impl`
> * arm: `fast_lock_2`
>
> Note that x86 and arm uses different names and the likely reason for that is that the `C2_MacroAssembler` subclass also implements a fast_lock function in that class, on those platforms.
>
> The fast_lock function in `C2_MacroAssembler` deals with the fast locking for all `LockingMode` implementations (monitor, legacy, and lightweight), while the `MacroAssembler::fast_lock*` functions only implement the lightweight locking implementation.
>
> I therefore propose that we use the name `MacroAssembler::lightweight_lock` on all platforms.
>
> *Note* that this is a small cleanup to update the names. The reason why I'm looking into this is that I want to move the C2 fast locking code out of the AArch64 (and other platforms) .ad file into C++ files to make it consistent with the x64 code structure (and to get better IDE support when the code is in plain C++ files). In that restructuring of the code I'm introducing `C2_MacroAssembler::fast_lock` functions that currently name-clash / shadow the `MacroAssembler::fast_lock` functions.
This pull request has now been integrated.
Changeset: 639ba13c
Author: Stefan Karlsson <stefank at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/639ba13c4b0ada1c2ae0a46e99ed707c219b3e53
Stats: 78 lines in 29 files changed: 0 ins; 0 del; 78 mod
8316179: Use consistent naming for lightweight locking in MacroAssembler
Reviewed-by: rkennke, coleenp, dholmes
-------------
PR: https://git.openjdk.org/jdk/pull/15709
More information about the hotspot-dev
mailing list