RFR: 8291555: Replace stack-locking with fast-locking
David Holmes
dholmes at openjdk.org
Sun Nov 13 22:56:20 UTC 2022
On Fri, 11 Nov 2022 14:35:22 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>>> So the data structure for lock records (per thread) could consist of a series of distinct values [ A B C ] and each of the values could be repeated, but only adjacently: [ A A A B C C ] for example.
>> @rose00 why only adjacently? Nested locking can be interleaved on different monitors.
>
> @dholmes-ora and all: I have prepared an alternative PR #10907 that implements the fast-locking behind a new experimental flag, and preserves the current stack-locking behavior as the default setting. It is currently implemented and tested on x86* and aarch64 arches. It is also less invasive because it keeps everything structurally the same (i.e. no method signature changes, no stack layout changes, etc). On the downside, it also means we can not have any of the associated cleanups and optimizations yet, but those are minor anyway. Also, there still is the risk that I make a mistake with the necessary factoring-out of current implementation. If we agree that this should be the way to go, then I would close this PR, and continue work on #10907.
@rkennke not unexpectedly I greatly prefer the optional and opt-in version in PR https://github.com/openjdk/jdk/pull/10907.
-------------
PR: https://git.openjdk.org/jdk/pull/10590
More information about the hotspot-dev
mailing list