RFR: 8330577: If the JFR event jdk.G1HeapRegionTypeChange is enabled, it is also written without region type change

Thomas Schatzl tschatzl at openjdk.org
Mon Apr 29 10:36:10 UTC 2024


On Thu, 25 Apr 2024 10:47:39 GMT, Andreas Steiner <asteiner at openjdk.org> wrote:

> Avoid to report jdk.G1HeapRegionTypeChange event if G1 region type is set to free even it is of type free already.

The CR contains an analysis:
* Free->Free: during heap resizing when G1 clears new `HeapRegion`s that were initialized as `Free`. There is no uninitialized state.
* Free->Free: when allocating humongous regions, G1 also calls `hr_clear()` on these regions, which I could be superfluous.
* Old->Old: only jdk11 and jdk17: the code unconditionally calls `set_old()` for evacuation failed regions. This changed in 21+ (maybe earlier, probably 18).

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

PR Comment: https://git.openjdk.org/jdk/pull/18949#issuecomment-2082383263


More information about the hotspot-gc-dev mailing list