On Mon, 22 Jun 2026 14:18:33 GMT, Jorn Vernee <[email protected]> wrote:

>> David Simms has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains 2822 commits:
>> 
>>  - Merge branch '8317277' into jep401_sub_review_8317279
>>  - Merge remote-tracking branch 'valhalla/lworld' into 8317277
>>  - 8386690: [lworld] cherry-pick JDK-8386124 Test 
>> serviceability/sa/TestG1HeapRegion.java failed: Address of G1HeapRegion does 
>> not match
>>    
>>    Reviewed-by: liach
>>  - 8385743: [lworld] investigate and address build related comments in the 
>> Valhalla PR
>>    
>>    Reviewed-by: liach, erikj
>>  - 8376346: [lworld] Basic Shenandoah support
>>    
>>    Reviewed-by: qamai
>>  - 8386598: [lworld] C1 acmp profiling fix and minor cleanup
>>    
>>    Reviewed-by: mchevalier
>>  - 8386618: [lworld] Remove unused entry_guard_Relocation
>>    
>>    Reviewed-by: chagedorn, jsjolen, jsikstro
>>  - Merge
>>    
>>    Merge jdk-28+2
>>  - 8386623: [lworld] Cleanup module support for system modules in JDK 
>> exploded build with preview resources
>>    
>>    Reviewed-by: liach
>>  - 8386316: [lworld] Replace Valhalla since version with 28
>>    
>>    Reviewed-by: darcy
>>  - ... and 2812 more: https://git.openjdk.org/jdk/compare/6def7d55...426cc065
>
> src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 2933:
> 
>> 2931:                         return true;
>> 2932:                     }
>> 2933:                 } while (true);
> 
> I think there's a potential fast path here for values whose payloads don't 
> have padding. This should always be the case for 1 and 2-byte payloads I 
> think.
> 
> In those cases, we could just do a binary compare and set. e.g. in this case:
> 
> 
> byte xByte = toByte(x); // notional function
> byte expectedByte = toByte(expected);
> return compareAndSetByte(o, offset, expectedByte, xByte);
> 
> 
> (Probably for the future)

Hmm, we might need to tweak these depending on if we anticipate hit/miss more 
often - also looking at compareAndSetByte, we might just derive a mask from a 
field map. IMO there're too many opportunities and I'm inclined to leave these 
for later.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31123#discussion_r3464157366

Reply via email to