RFR: 8357445: G1: Time-Based Heap Uncommit During Idle Periods [v7]

Thomas Schatzl tschatzl at openjdk.org
Thu Nov 20 15:09:02 UTC 2025


On Wed, 27 Aug 2025 12:00:41 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Fwiw, to avoid startup delays (calling `Ticks::now()` on thousands of regions is expensive - I did not test, but it seems reasonable and should be measured), it might be useful to do that initialization lazily (first time the background thread executes).
>
> There is potentially the same issue about calling `Ticks::now()` for thousands of freed regions during GC.

This call is still unnecessary. The constructor will call `initialize` which calls `hr_clear()` which does the initialization. Just set it to zero (or some "invalid value" here like other members show).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26240#discussion_r2546108011


More information about the hotspot-dev mailing list