RFR: 8320318: ObjectMonitor Responsible thread [v3]

Fredrik Bredberg fbredberg at openjdk.org
Wed Sep 25 12:40:43 UTC 2024


On Fri, 20 Sep 2024 05:05:22 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Fredrik Bredberg has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update two, after the review
>
> src/hotspot/cpu/ppc/macroAssembler_ppc.cpp line 2734:
> 
>> 2732:   // We need a full fence after clearing owner to avoid stranding.
>> 2733:   // StoreLoad achieves this.
>> 2734:   membar(StoreLoad);
> 
> Suggestion:
> 
>   fence();
> 
> similar to S390

I use `membar(StoreLoad)` in all other platforms except in S390, and that is because it has no `membar()` implementation. I want to be consistent and choose to go with prior art, which happens to be the `OrderAccess::storeload()` called from `ObjectMonitor::exit()`. In PowerPC both `fence() `and `membar(StoreLoad)` are mapped to a `sync` instruction, so there is no real difference. But for consistency reasons I choose  `membar(StoreLoad)`. You know, "when in Rome"...

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

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


More information about the hotspot-dev mailing list