RFR: 8315884: New Object to ObjectMonitor mapping [v9]
Coleen Phillimore
coleenp at openjdk.org
Tue Jul 23 19:09:48 UTC 2024
On Wed, 17 Jul 2024 06:40:31 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> src/hotspot/share/runtime/basicLock.hpp line 46:
>>
>>> 44: // Used as a cache the ObjectMonitor* used when locking. Must either
>>> 45: // be nullptr or the ObjectMonitor* used when locking.
>>> 46: volatile uintptr_t _metadata;
>>
>> The displaced header/markword terminology was very well known to people, whereas "metadata" is really abstract - people will always need to go and find out what it actually refers to. Could we not define a union here to support the legacy and lightweight modes more explicitly and keep the existing terminology for the setters/getters for the code that uses it?
>
> I should have read ahead. I see you do keep the setters/getters.
When we remove legacy locking in a couple of releases, we could rename this field cached_monitor.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20067#discussion_r1688015247
More information about the core-libs-dev
mailing list