RFR: 8320318: ObjectMonitor Responsible thread [v2]

Fredrik Bredberg fbredberg at openjdk.org
Fri Sep 13 13:19:28 UTC 2024


On Wed, 11 Sep 2024 07:15:29 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> Fredrik Bredberg has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update one, after the review
>
> src/hotspot/share/runtime/objectMonitor.cpp line 313:
> 
>> 311:   // The monitor is private to or already owned by locking_thread which must be suspended.
>> 312:   // So this code may only contend with deflation.
>> 313:   assert(locking_thread == Thread::current() || locking_thread->is_obj_deopt_suspend(), "must be");
> 
> I feel like the comments and assert now belong in `ObjectMonitor::enter_for_with_contention_mark`. 
> 
> `enterI_with_contention_mark` should be renamed. This is now a sort of `TryLock_with_contention_mark`. 
> 
> `add_to_contentions(1);` below could be changed to `contention_mark.extend()`.

fixed

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1758854361


More information about the hotspot-dev mailing list