RFR: 8320318: ObjectMonitor Responsible thread
    Axel Boldt-Christmas 
    aboldtch at openjdk.org
       
    Wed Sep 11 06:21:08 UTC 2024
    
    
  
On Wed, 11 Sep 2024 00:30:17 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 482:
>> 
>>> 480:   // This is faster on Nehalem and AMD Shanghai/Barcelona.
>>> 481:   // See https://blogs.oracle.com/dave/entry/instruction_selection_for_volatile_fences
>>> 482:   lock(); addl(Address(rsp, 0), 0);
>> 
>> Since there's a membar above, do you need this lock/addl instructions?
>
> Just FTR this is a full fence on x86.
It is not needed. `membar(StoreLoad)` does exactly this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1753184198
    
    
More information about the hotspot-dev
mailing list