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

Daniel D. Daugherty dcubed at openjdk.org
Tue Mar 28 21:43:01 UTC 2023


On Tue, 28 Mar 2023 02:48:30 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Ensure safepoint when processing lock-stack
>
> src/hotspot/share/runtime/threads.cpp line 1433:
> 
>> 1431: 
>> 1432: JavaThread* Threads::owning_thread_from_monitor(ThreadsList* t_list, ObjectMonitor* monitor) {
>> 1433:   assert(SafepointSynchronize::is_at_safepoint(), "not safe outside of safepoint");
> 
> Shouldn't this be gated on UseFastLocking?

Hmmm.... `owning_thread_from_monitor()` is only called from
`ObjectSynchronizer::get_lock_owner()` when `get_lock_owner()`
knows that it has an ObjectMonitor in hand. I'm not at all sure that
we can assert that `ObjectSynchronizer::get_lock_owner()` is
only called from a safepoint.

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

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


More information about the serviceability-dev mailing list