RFR: 8362278: G1: Consolidate functions for recording pause start time

Thomas Schatzl tschatzl at openjdk.org
Wed Jul 16 09:53:42 UTC 2025


On Tue, 15 Jul 2025 16:13:34 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:

> Hi,
> 
> Please review this refactoring change to unify the recording of GC Pause start-time.
> 
> Testing: Tier 1

Changes requested by tschatzl (Reviewer).

src/hotspot/share/gc/g1/g1Policy.cpp line 670:

> 668: }
> 669: 
> 670: void G1Policy::record_gc_pause_start_time() {

Could this be named `record_pause_start_time()` which would better correspond to the `record_pause` call at the end of the respective pause?

There is also a kind of mismatch to this name and the `record_cur_collection_start_sec`, which might be more appropriately named `record_cur_pause_start_sec` following this naming.

It's just right now the code uses `gc`, `collection`, `pause` in the names which makes reading a bit harder than necessary.

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

PR Review: https://git.openjdk.org/jdk/pull/26323#pullrequestreview-3024051784
PR Review Comment: https://git.openjdk.org/jdk/pull/26323#discussion_r2209843709


More information about the hotspot-gc-dev mailing list