RFR: 8291555: Implement alternative fast-locking scheme [v52]

Thomas Stuefe stuefe at openjdk.org
Tue Apr 4 13:01:04 UTC 2023


On Tue, 4 Apr 2023 12:25:19 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> That is done one layer up in InterpreterMacroAssembler::unlock_object.
>
> Thanks @tstuefe . I see at that level if the object doesn't match the top of the lock-stack then we take the slow path. But then I'm lost - AFAICS the slow path is `InterpreterRuntime::monitorexit` and that doesn't have any fast-locking code in it at all ???

I'm not sure what you mean. `InterpreterRuntime::monitorexit` will enter `ObjectSynchronizer::exit` which handles the fast-locking case under `if (LockingMode == 2)...`. Or am I misunderstanding you?

(I really wish for named constants instead of `1` and `2` constants though...)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/10907#discussion_r1157209193


More information about the serviceability-dev mailing list