RFR: 8252645: Change time measurements in G1ServiceThread to only account remembered set work

Stefan Johansson sjohanss at openjdk.java.net
Thu Nov 26 10:40:02 UTC 2020


Please review this change to move the timing of how much time is spent doing remembered set sampling into the task doing the sampling. The timing has historically been part of the service thread, because in the past the only thing the thread did was sampling. Now when both uncommit work and periodic GC scheduling has been added, the timing needs to be moved into the sampling task.

I've also slightly changed the output using this information to:
[0,295s][trace][gc,remset   ] GC(0)   Sampling task time (ms)
[0,295s][trace][gc,remset   ] GC(0)           0,000
Instead of the old:
[0,301s][trace][gc,remset   ] GC(0)   Service thread time (s)
[0,301s][trace][gc,remset   ] GC(0)           0,00

I decided to change the unit to ms because the time spent doing sampling is very small and is better measured in milliseconds. When doing so I also went with three decimals since this is what we normally do for milliseconds.

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

Commit messages:
 - 8252645: Change time measurements in G1ServiceThread to only account remembered set work

Changes: https://git.openjdk.java.net/jdk/pull/1447/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1447&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8252645
  Stats: 93 lines in 6 files changed: 50 ins; 30 del; 13 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1447.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1447/head:pull/1447

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



More information about the hotspot-gc-dev mailing list