RFR: 8315884: New Object to ObjectMonitor mapping [v9]

David Holmes dholmes at openjdk.org
Wed Jul 17 06:42:54 UTC 2024


On Wed, 17 Jul 2024 06:39:14 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Axel Boldt-Christmas has updated the pull request incrementally with 10 additional commits since the last revision:
>> 
>>  - Remove try_read
>>  - Add explicit to single parameter constructors
>>  - Remove superfluous access specifier
>>  - Remove unused include
>>  - Update assert message OMCache::set_monitor
>>  - Fix indentation
>>  - Remove outdated comment LightweightSynchronizer::exit
>>  - Remove logStream include
>>  - Remove strange comment
>>  - Fix javaThread include
>
> 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.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20067#discussion_r1680497748


More information about the core-libs-dev mailing list