Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accelerate Unsafe CAS Intrinsics on Power and X #19991

Merged
merged 1 commit into from
Oct 4, 2024

Commits on Sep 23, 2024

  1. Accelerate Unsafe CAS Intrinsics on Power and X

    Adds support for the following recognized methods:
    CompareAndExchangeObject     //JDK11
    CompareAndExchangeReference  //JDK17,21
    CompareAndExchangeInt        //JDK11,17,21
    CompareAndExchangeLong       //JDK11,17,21
    
    Similar to their CompareAndSet counterparts, the JIT acceleration does
    not support CAE on static fields so the createUnsafeCASCallDiamond
    function was updated to also work on the CAE methods.
    
    The accelerated CAE code was built on top of the existing accelerated
    CAS support on both Power and X.
    
    Removed recognized CAS enums from isUnsafePut. They are not Unsafe put
    methods and these cases could not be triggered.
    
    Even before my changes, setting TR_UseOldCompareAndSwapObject and
    TR_DisableCASInlining would cause a crash on x. It doesn't really make
    sense to set both at the same time but I fixed it anyways since it was
    quick.
    
    VMwrtbarWithoutStoreEvaluator is used for several different opcdes
    include arraycopy, ArrayStoreCHK, writeBarrier and Unsafe CAS calls.
    This is only used for the Unsafe CAS calls that store an object.
    
    To differtiate Unsafe CAS calls from the other cases, there is a check
    for the node being an icall. This check is no longer valid with the
    introduction of support for compareAndExchangeReference. The node in
    this case is an acall.
    
    This changes the check to a generic call check. There is also a check
    for the call being to a recognized method. This check now checks for
    specific recognized methods which are:
    
    sun_misc_Unsafe_compareAndSwapObject_jlObjectJjlObjectjlObject_Z
    jdk_internal_misc_Unsafe_compareAndExchangeObject
    jdk_internal_misc_Unsafe_compareAndExchangeReference
    
    Signed-off-by: jimmyk <[email protected]>
    IBMJimmyk committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    fda8a6f View commit details
    Browse the repository at this point in the history