RFR: 8269222: Incorrect number of workers reported for reference processing

Albert Mingkun Yang ayang at openjdk.java.net
Thu Jun 24 17:40:49 UTC 2021


Override the `worker_id` used by worker time trackers to `0` in sequential ref-processing.

With this patch, `java -XX:+UseParallelGC -Xms2g -Xmx2g -XX:+ParallelRefProcEnabled -Xlog:gc,gc+phases+ref=debug:gc.log::filecount=0 -jar dacapo-9.12-MR1-bach.jar h2 -n 1` prints


[2.159s][debug][gc,phases,ref] GC(0)   Reconsider SoftReferences: 0.0ms
[2.159s][debug][gc,phases,ref] GC(0)     SoftRef (ms):                  skipped
[2.159s][debug][gc,phases,ref] GC(0)   Notify Soft/WeakReferences: 0.1ms
[2.159s][debug][gc,phases,ref] GC(0)     SoftRef (ms):                  Min:  0.0, Avg:  0.0, Max:  0.0, Diff:  0.0, Sum:  0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0)     WeakRef (ms):                  Min:  0.0, Avg:  0.0, Max:  0.0, Diff:  0.0, Sum:  0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0)     FinalRef (ms):                 Min:  0.0, Avg:  0.0, Max:  0.0, Diff:  0.0, Sum:  0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0)     Total (ms):                    Min:  0.0, Avg:  0.0, Max:  0.0, Diff:  0.0, Sum:  0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0)   Notify and keep alive finalizable: 0.0ms
[2.159s][debug][gc,phases,ref] GC(0)     FinalRef (ms):                 skipped
[2.159s][debug][gc,phases,ref] GC(0)   Notify PhantomReferences: 0.0ms
[2.159s][debug][gc,phases,ref] GC(0)     PhantomRef (ms):               Min:  0.0, Avg:  0.0, Max:  0.0, Diff:  0.0, Sum:  0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0)   SoftReference:
[2.159s][debug][gc,phases,ref] GC(0)     Discovered: 0
[2.159s][debug][gc,phases,ref] GC(0)     Cleared: 0
[2.159s][debug][gc,phases,ref] GC(0)   WeakReference:
[2.159s][debug][gc,phases,ref] GC(0)     Discovered: 316
[2.159s][debug][gc,phases,ref] GC(0)     Cleared: 188
[2.159s][debug][gc,phases,ref] GC(0)   FinalReference:
[2.159s][debug][gc,phases,ref] GC(0)     Discovered: 4
[2.159s][debug][gc,phases,ref] GC(0)     Cleared: 4
[2.159s][debug][gc,phases,ref] GC(0)   PhantomReference:
[2.159s][debug][gc,phases,ref] GC(0)     Discovered: 156
[2.159s][debug][gc,phases,ref] GC(0)     Cleared: 67


It's "Workers: 1" since #refs < 1000.

-------------

Commit messages:
 - tracker

Changes: https://git.openjdk.java.net/jdk/pull/4588/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4588&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8269222
  Stats: 23 lines in 5 files changed: 15 ins; 0 del; 8 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4588.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4588/head:pull/4588

PR: https://git.openjdk.java.net/jdk/pull/4588



More information about the hotspot-gc-dev mailing list