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

Simplify and inline os::SpinPause() for non-Windows OS on X86

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 11
    • hotspot
    • None

      Modern GCC supports issuing the PAUSE instruction directly on X86, so there is no need to have multiple assembly files issuing the "rep nop" instruction. Removing assembly functions also enables inlining of os::SpinPause().

      Running DaCapo benchmarks with G1, ParallelGC, and CMS does not show noticeably difference in performance with and without this patch. Applying the patch similarly to a microbenchmark for SpinPause() shows about 3% average wall clock time reduction with 50 and 100 threads, but the reduction may not be conclusive as it is within the range of standard deviation. The microbenchmark is from here:
      http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2012-August/004352.html

      The machine has two Intel Xeon E5-2690v4 CPUs with a total of 28 physical cores and 56 hyperthreaded cores. OUTER_LOOP_SIZE is increased by 20X so it runs longer on a modern machine. The OS is running a modified Debian Linux kernel version 4.9.82. The program was built with GCC option -O2.
      The results are statistics of 30 trials, with 10, 50, and 100 threads, measuring the real/user/sys time using the bash "time" built-in.

      Attached to this bug is the data showing the results of the patch on the microbenchmark.

            Unassigned Unassigned
            jcbeyler Jean Christophe Beyler
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: