RFR: 8291555: Implement alternative fast-locking scheme [v30]
Roman Kennke
rkennke at openjdk.org
Thu Mar 30 14:00:09 UTC 2023
On Tue, 28 Mar 2023 21:39:21 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> 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.
There has been a single call path from management.cpp that is not calling this code at a safepoint, and I changed that code to take the safepoint-taking variant code-path when using UseFastLocking. That path already existed and has been used when max_depth == 0.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/10907#discussion_r1153307575
More information about the serviceability-dev
mailing list