RFR: 8320318: ObjectMonitor Responsible thread [v2]

Fredrik Bredberg fbredberg at openjdk.org
Wed Sep 18 18:29:24 UTC 2024


On Mon, 16 Sep 2024 16:03:16 GMT, Patricio Chilano Mateo <pchilanomate 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 358:
> 
>> 356: void ObjectMonitor::enter_for_with_contention_mark(JavaThread* locking_thread, ObjectMonitorContentionMark& contention_mark) {
>> 357:   // Used by LightweightSynchronizer::inflate_and_enter in deoptimization path to enter for another thread.
>> 358:   bool success = ObjectMonitor::TryLock_with_contention_mark(locking_thread, contention_mark);
> 
> No need to use qualified name.

fixed

> src/hotspot/share/runtime/objectMonitor.cpp line 376:
> 
>> 374:   }
>> 375: 
>> 376:   bool success = ObjectMonitor::TryLock_with_contention_mark(locking_thread, contention_mark);
> 
> No need to use qualified name.

fixed

> src/hotspot/share/runtime/objectMonitor.hpp line 376:
> 
>> 374:   ObjectWaiter* DequeueWaiter();
>> 375:   void      DequeueSpecificWaiter(ObjectWaiter* waiter);
>> 376:   bool      TryLock_with_contention_mark(JavaThread* locking_thread, ObjectMonitorContentionMark& contention_mark);
> 
> Following the existing style this should be TryLockWithContentionMark.

fixed

> src/hotspot/share/runtime/sharedRuntime.cpp line 1973:
> 
>> 1971:       // Some other thread acquired the lock (or the monitor was
>> 1972:       // deflated). Either way we are done.
>> 1973:       current->inc_held_monitor_count(-1);
> 
> We can just use dec_held_monitor_count().

fixed

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1765518111
PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1765516028
PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1765515609
PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1765518719


More information about the hotspot-dev mailing list