RFR: 8296124: G1: Call record_root_region_scan_wait_time conditionally

Kim Barrett kbarrett at openjdk.org
Tue Nov 1 16:31:52 UTC 2022


On Mon, 31 Oct 2022 12:15:13 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> Simple change of making an update conditional in young-gc-pause.
> 
> Test: hotspot_gc

[I waffled about this, and might still be convinced otherwise.]

I think this change should not be made. I think the assignment to zero by
G1GCPhaseTimes::reset() probably shouldn't be considered normative. Rather, I
think it's mostly an aid to development/debugging, and could be removed or
made optional or debug-only or something like that, so should not be relied
upon. All of these recorded times should be set to a particular GC's value
before there are any uses by that GC, else there is a bug. Resetting all of
them to zero at the start of the GC helps to diagnose improper usage.

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

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


More information about the hotspot-gc-dev mailing list