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

Roman Kennke rkennke at openjdk.org
Thu Mar 30 11:48:46 UTC 2023


On Sat, 25 Mar 2023 08:55:25 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> I have another question about the asymmetric unlocking code in `InterpreterMacroAssembler::unlock_object`.
> 
> We go through here for both fast-locked and fat OM locks, right? If so, shouldn't we do the asymmetric lock check only for the fast locked case? Otherwise Lockstack may be empty, so we compare the word preceding the first slot, which would cause us to always break into the slow case?
> 
> Sorry if I miss something here.

Uh, yes, indeed. It works by accident, I suppose, because we don't segfault on the word preceding the lock-stack, and monitor-locking takes the slow-case in interpreter, anyway. But yeah, it's better to check for it.

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

PR Comment: https://git.openjdk.org/jdk/pull/10907#issuecomment-1490163377


More information about the serviceability-dev mailing list