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

Add filter to speed up CompileCommand lookup

XMLWordPrintable

    • b27
    • 16
    • b15

      While working on things related to JDK-8246402, I wrote a JMH that constantly loads new classes and creates a few instances of them in each iteration.
      On my WS

      16-b26: 451.955 ± 1.864 ops/s
      16-b27: 394.893 ± 5.071 ops/s

      Using perf top, I can see from b27 the test spends 5-7% of its time in CompilerOracle::has_option_value<double>
       even when the compilation has quieted down after the first few seconds of running.
      I think this is related to https://bugs.openjdk.java.net/browse/JDK-8256508

         9.11% [kernel] [k] read_hpet
         6.96% libjvm.so [.] CompilerOracle::has_option_value<double>
         4.01% libjvm.so [.] steal_work
         2.93% [kernel] [k] do_syscall_64
         2.31% libc-2.23.so [.] vfprintf


      The micro is here:

      https://github.com/ericcaspole/jmh-jdk-microbenchmarks/blob/dyn-load-and-new/micros-jdk8/src/main/java/org/openjdk/bench/java/lang/DynamicLoading.java

      Run it like:
      $ numactl --membind=1 --cpunodebind=1 /opt/jdk-16-b27/bin/java -jar target/micros-jdk8-1.0-SNAPSHOT.jar DynamicLoading.loadAndSeveralNewInstance -f 1 -i 8 -p instances=25 -p numberOfClasses=10 -jvmArgs "-XX:+PrintCompilation -XX:+UseParallelGC"

      All that being said I dont know if other benchmarks see any regression from tihs one.

            neliasso Nils Eliasson (Inactive)
            ecaspole Eric Caspole
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: