RFR: 8359701: G1: Move heap expansion time tracking of G1CollectedHeap:expand to call site
Thomas Schatzl
tschatzl at openjdk.org
Tue Jun 17 06:10:29 UTC 2025
On Mon, 16 Jun 2025 15:35:59 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple patch of moving time-tracking logic from callee to caller, which removes a default arg. The default-arg is there because there are other callers that don't use/need this time-tracking logic.
>
> Test: tier1
Marked as reviewed by tschatzl (Reviewer).
src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 2395:
> 2393: // No need for an ergo logging here,
> 2394: // expansion_amount() does this when it returns a value > 0.
> 2395: Ticks expand_start_instant = Ticks::now();
Suggestion:
Ticks expand_start = Ticks::now();
It is very unusual to add an `_instant` postfix to similar variables, regardless of whether using `Ticks` or the `elapsedTime` API, so I suggested to remove it.
-------------
PR Review: https://git.openjdk.org/jdk/pull/25835#pullrequestreview-2934248722
PR Review Comment: https://git.openjdk.org/jdk/pull/25835#discussion_r2151396041
More information about the hotspot-gc-dev
mailing list