RFR: 8351655: Optimize ObjectMonitor::unlink_after_acquire() [v2]
Fredrik Bredberg
fbredberg at openjdk.org
Fri Mar 21 09:23:36 UTC 2025
On Thu, 20 Mar 2025 16:34:29 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 after review
>
> src/hotspot/share/runtime/objectMonitor.cpp line 1258:
>
>> 1256: // entry_list can be in any of these forms:
>> 1257: // 1. Only singly linked.
>> 1258: // 2. Only doubly linked.
>
> This case should also never happen. If the whole list is already fully doubly linked we would not call this.
Rewrote the comment.
> src/hotspot/share/runtime/objectMonitor.cpp line 1287:
>
>> 1285: // into a doubly linked list. Now we just need to set the tail
>> 1286: // pointer.
>> 1287: assert(prev == nullptr || prev->next() == nullptr, "invariant");
>
> Since empty list is not possible instead of `prev == nullptr ||` this should be `prev != nullptr &&`.
Fixed
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24078#discussion_r2007164136
PR Review Comment: https://git.openjdk.org/jdk/pull/24078#discussion_r2007163432
More information about the hotspot-runtime-dev
mailing list