Skip to content

Valhalla implementation required for latest OpenJDK/Valhalla updates #22642

@JasonFengJ9

Description

@JasonFengJ9

With latest OpenJDK/Valhalla updates, following OpenJ9 Valhalla implementations are required:

  • jdk.internal.misc.Unsafe

    • public final Object getAndSetReference(Object obj, long offset, Class<?> valueType, Object value)
    • public final Object getAndSetReferenceAcquire(Object obj, long offset, Class<?> valueType, Object value)
    • public final Object getAndSetReferenceRelease(Object obj, long offset, Class<?> valueType, Object value)
    • public void notifyStrictStaticAccess(Class<?> clz, long staticFieldOffset, boolean writing)
  • JVM_CopyOfSpecialArray

  • JVM_IsAtomicArray

  • JVM_NewNullRestrictedNonAtomicArray

    • the initialValue which can't be null
  • JVM_NewNullRestrictedAtomicArray

    • support an additional parameter initialValue which can't be null
  • Resolve test failures

    • expecting implicitly constructible classes as inputs
      java.lang.IllegalArgumentException
             at java.base/jdk.internal.value.ValueClass.newNullRestrictedAtomicArray(Native Method)
    
    • gc test failures due to lack of support for newNullRestrictedAtomicArray. Current workaround is to keep the manual initialization
       java.lang.AssertionError: expected [-1114130] but found [0]
             at org.testng.Assert.fail(Assert.java:96)
      

Related to

FYI @hangshao0 @theresa-m @tajila

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions