RFR: 8295354: Remove G1 incremental non-copy time calculation

Thomas Schatzl tschatzl at openjdk.org
Fri Nov 4 14:43:22 UTC 2022


Hi,

   Currently G1 calculates the total non-copy time for young gen incrementally as regions are added to the young gen. The reason for this is that previously getting remembered set size has been expensive (i.e. part of non-copy time).

That is not the case any more since JDK 16 or so.

Further, actually in the calculation the remset work time does not need to be calculated on a per-region basis at all; first, it is incorrect as it does not remove duplicates, and additionally there is/has always been a total remembered set prediction anyway. (Which means the remembered set scan/merge time is considered multiple times).

So all this code can be removed. 

Note that this change also fixes the same issue (double-counting of scan/merge time) for survivor regions.

Testing: tier1-3, manual testing wrt to pause time predictions which seem to be slightly better

Thanks,
  Thomas

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

Commit messages:
 - Refactoring, documentation
 - initial version

Changes: https://git.openjdk.org/jdk/pull/10987/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10987&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8295354
  Stats: 196 lines in 7 files changed: 29 ins; 156 del; 11 mod
  Patch: https://git.openjdk.org/jdk/pull/10987.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10987/head:pull/10987

PR: https://git.openjdk.org/jdk/pull/10987


More information about the hotspot-gc-dev mailing list