RFR: 8320318: ObjectMonitor Responsible thread [v2]

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


On Tue, 10 Sep 2024 14:22:35 GMT, Coleen Phillimore <coleenp 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/cpu/x86/c2_MacroAssembler_x86.cpp line 510:
> 
>> 508: 
>> 509:   // Memory barrier/fence
>> 510:   // Dekker pivot point -- fulcrum : ST Owner; MEMBAR; LD Succ
> 
> I think you should delete this whole comment block.  The source code control system will remember this comment about Nehalem and AMD Shanghai/Barcelona.

fixed

> src/hotspot/share/runtime/javaThread.hpp line 620:
> 
>> 618: 
>> 619:   // Support for SharedRuntime::monitor_exit_helper()
>> 620:   ObjectMonitor* unlocked_inflated_monitor() { return _unlocked_inflated_monitor; }
> 
> Can you make this a const method?

fixed

> src/hotspot/share/runtime/objectMonitor.cpp line 904:
> 
>> 902:   }
>> 903: 
>> 904:   assert(_succ != current, "invariant");
> 
> This assert seems unnecessary since it's just reset above.

fixed

> src/hotspot/share/runtime/objectMonitor.cpp line 1243:
> 
>> 1241:       ObjectMonitorContentionMark contention_mark(this);
>> 1242: 
>> 1243:       if (contentions() < 0) {
> 
> You should use is_being_async_deflated() here instead of contentions() < 0.

fixed

> src/hotspot/share/runtime/objectMonitor.cpp line 1244:
> 
>> 1242: 
>> 1243:       if (contentions() < 0) {
>> 1244:         assert((intptr_t(_EntryList)|intptr_t(_cxq)) == 0 || _succ != nullptr, "");
> 
> Please add a space between | in this expression.

fixed

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1758844352
PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1758846833
PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1758848201
PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1758849327
PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1758855247


More information about the hotspot-dev mailing list