RFR: 8305898: Alternative self-forwarding mechanism
Roman Kennke
rkennke at openjdk.org
Thu Aug 22 06:19:06 UTC 2024
On Wed, 21 Aug 2024 20:34:45 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> It might not be clear to reviewers, but the suggested change forces the usage of Lightweight locking on 32-bit JVMs. I think that is OK, especially given that Legacy locking is deprecated. However, before approving this PR it would be good to know if this has been communicated to the maintainers of the affected platforms?
>
> And with that said, I couldn't find anything in this patch that prevented 32-bit JVMs from starting with Legacy. There's only these asserts:
>
> ```
> NOT_LP64(assert(LockingMode != LM_LEGACY, "incorrect with LM_LEGACY on 32 bit");)
> ```
Right, with this change, we cannot use legacy locking on 32bit platforms anymore, because 1. the self-fwd bit would conflict with stack-locks because stack-locks are only 4-byte aligned on those platforms and 2. we no longer preserve headers around self-forwarding. No I haven't communicated this, yet.
It might be better to seperate out the removal of preserved-headers around self-forwarding, and deal with header preservation and the implications on 32-bit platforms in a separate PR, WDYT?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20603#issuecomment-2303868150
More information about the hotspot-gc-dev
mailing list