[master] RFR: Lilliput om world

Axel Boldt-Christmas aboldtch at openjdk.org
Tue Jun 4 22:42:38 UTC 2024


On Mon, 3 Jun 2024 12:27:54 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Ok, yes, I missed that the fast lock stack case set the monitor.  I was trying to keep the CacheSetter contained in lightweightSynchronizer.cpp.  I'll do some more refactoring.  Thanks for pointing this out.
>
> Oh now I see.  If we do a recursive lock, we need to clear_object_monitor_cache for some reason I haven't figured out yet.

Yeah I am not 100% happy with the CacheSetter, it at least needs better documentation. The issue is an uninitialised value will (more than likely) look like a ObjectMonitor* to the cache lookup code. So it will break if this thread observers that it is inflated (by for example calling wait), where it will then crash when doing a cache lookup in exit.

It aims to uphold the simple invariant that after ObjectSynchronize::enter the BasicLock contains either the ObjectMonitor locked on or nullptr.

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

PR Review Comment: https://git.openjdk.org/lilliput/pull/181#discussion_r1624509500


More information about the lilliput-dev mailing list