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

Thomas Schatzl tschatzl at openjdk.java.net
Fri Jun 25 07:15:59 UTC 2021


On Thu, 24 Jun 2021 17:33:31 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> 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.

Lgtm.

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

Marked as reviewed by tschatzl (Reviewer).

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



More information about the hotspot-gc-dev mailing list