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

Cut-paste error in InterfaceCalls JMH

XMLWordPrintable

    • b17

      I just noticed this, testCallPoly5 is only looping up to 3, so it is doing the same thing as testCallPoly3. I think this has always been there since it was written.

      open/test/micro/org/openjdk/bench/vm/compiler/InterfaceCalls.java


      252 /** Interface call with three different receivers */
      253 @Benchmark
      254 public void testCallPoly3(Blackhole bh) {
      255 for (int kk = 0; kk < 3; kk++) {
      256 bh.consume(as[kk].getInt());
      257 }
      258 }
      259
      260 /** Interface call with five different receivers. */
      261 @Benchmark
      262 public void testCallPoly5(Blackhole bh) {
      263 for (int kk = 0; kk < 3; kk++) {
      264 bh.consume(as[kk].getInt());
      265 }
      266 }

            ecaspole Eric Caspole
            ecaspole Eric Caspole
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: