Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8309373

Performance drop in Vector-API based kernel with JDK-21

XMLWordPrintable

    • x86_64
    • generic

      Attached test case taken from recently release parquet-mr bit packing optimization (https://github.com/apache/parquet-mr/commit/d730fa7466f9fa15e1e4a4254f22af9c6783acdc)
      shows performance degradation with JDK-21 but work fine with JDK-17,18,19 and 20.

      CommandLine:
      java --add-modules=jdk.incubator.vector -XX:+UnlockDiagnosticVMOptions -XX:-UseOnStackReplacement -XX:+TraceTypeProfile -XX:TypeProfileLevel=222 -XX:CompileCommand=PrintIntrinsics,VectorBitUnpacker3::unpack8Values_vec -cp . VectorBitUnpacker3


      JDK-21
      =======
      openjdk 21-ea 2023-09-19
      OpenJDK Runtime Environment (build 21-ea+25-2212)
      OpenJDK 64-Bit Server VM (build 21-ea+25-2212, mixed mode, sharing)
       
      TypeProfile shows profile pollution and abstract Species as receiver type.

       jdk.incubator.vector.AbstractShuffle::toBitsVectorTemplate
                                                                @ 9 jdk.incubator.vector.ShortVector$ShortSpecies::elementType (4 bytes)
                                                                 \-> TypeProfile (2799/10469 counts) = jdk/incubator/vector/ShortVector$ShortSpecies
       jdk.incubator.vector.AbstractShuffle::toBitsVectorTemplate
                                                                @ 9 jdk.incubator.vector.ByteVector$ByteSpecies::elementType (4 bytes)
                                                                 \-> TypeProfile (7670/10469 counts) = jdk/incubator/vector/ByteVector$ByteSpecies
       jdk.incubator.vector.AbstractShuffle::toBitsVectorTemplate
                                                                @ 14 jdk.incubator.vector.ShortVector$ShortSpecies::dummyVector (5 bytes)
                                                                 \-> TypeProfile (2799/10469 counts) = jdk/incubator/vector/ShortVector$ShortSpecies
       jdk.incubator.vector.AbstractShuffle::toBitsVectorTemplate
                                                                @ 14 jdk.incubator.vector.ByteVector$ByteSpecies::dummyVector (5 bytes)
                                                                 \-> TypeProfile (7670/10469 counts) = jdk/incubator/vector/ByteVector$ByteSpecies



      Print-Intrinsics Log:-
                                                              @ 45 jdk.internal.vm.vector.VectorSupport::convert (36 bytes) failed to inline (intrinsic)
                                                                        @ 19 jdk.internal.vm.vector.VectorSupport::fromBitsCoerced (35 bytes) failed to inline (intrinsic)


      JDK-20
      =======
      openjdk 20.0.1 2023-04-18
      OpenJDK Runtime Environment (build 20.0.1+9-29)
      OpenJDK 64-Bit Server VM (build 20.0.1+9-29, mixed mode, sharing)

      No such method name toBitsVectorTemplate in JDK-20.

      Intrinsification log shows both the APIs are getting intrinsified
                                              @ 322 jdk.internal.vm.vector.VectorSupport::convert (36 bytes) (intrinsic)
                                              @ 1 java.lang.Object::getClass (0 bytes) (intrinsic)
                                              @ 5 java.lang.Object::getClass (0 bytes) (intrinsic)
                                                        @ 19 jdk.internal.vm.vector.VectorSupport::fromBitsCoerced (35 bytes) (intrinsic)
                                                        @ 1 java.lang.Object::getClass (0 bytes) (intrinsic)
                                                        @ 5 java.lang.Object::getClass (0 bytes) (intrinsic)
       

            jbhateja Jatin Bhateja
            jbhateja Jatin Bhateja
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: