RFR: 8367473: Shenandoah: Make the detailed evacuation metrics a runtime diagnostic option [v5]
William Kemper
wkemper at openjdk.org
Thu Sep 18 17:36:31 UTC 2025
On Thu, 18 Sep 2025 17:31:19 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> Non-product builds currently have a feature to produce detailed metrics about evacuations (number of objects, number of bytes, split out by age (young, old, promotion) and thread (mutator or worker). This change makes this feature accessible in release builds as a diagnostic option.
>
> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
>
> Only print promotion/old evacuation metrics in generational mode
When the diagnostic option is disabled there is no additional output in the logs. When the option is enabled, we'll see a break down of which type of evacuations were performed by which threads:
[2025-09-18T17:02:08.963+0000][31.169s][24648][info ][gc,stats ] Workers:
[2025-09-18T17:02:08.963+0000][31.169s][24648][info ][gc,stats ] Young: Evacuated 8469K across 122601 objects, abandoned 1840B across 23 objects.
[2025-09-18T17:02:08.963+0000][31.169s][24648][info ][gc,stats ] Promotion: Evacuated 0B across 0 objects, abandoned 0B across 0 objects.
[2025-09-18T17:02:08.963+0000][31.169s][24648][info ][gc,stats ] Old: Evacuated 0B across 0 objects, abandoned 0B across 0 objects.
[2025-09-18T17:02:08.963+0000][31.169s][24648][info ][gc,stats ]
[2025-09-18T17:02:08.963+0000][31.169s][24648][info ][gc,stats ] Mutators:
[2025-09-18T17:02:08.963+0000][31.169s][24648][info ][gc,stats ] Young: Evacuated 845K across 10247 objects, abandoned 803K across 7852 objects.
[2025-09-18T17:02:08.963+0000][31.169s][24648][info ][gc,stats ] Promotion: Evacuated 0B across 0 objects, abandoned 0B across 0 objects.
[2025-09-18T17:02:08.963+0000][31.169s][24648][info ][gc,stats ] Old: Evacuated 0B across 0 objects, abandoned 0B across 0 objects.
When the option is enabled in single-gen mode, we will see only evacuation data for young regions (there are no promotions or old evacuations in this mode):
[2025-09-18T17:30:04.246+0000][3.663s][20861][info][gc,stats ] Workers:
[2025-09-18T17:30:04.246+0000][3.663s][20861][info][gc,stats ] Young: Evacuated 5555K across 122874 objects, abandoned 0B across 0 objects.
[2025-09-18T17:30:04.246+0000][3.663s][20861][info][gc,stats ]
[2025-09-18T17:30:04.246+0000][3.663s][20861][info][gc,stats ] Mutators:
[2025-09-18T17:30:04.246+0000][3.663s][20861][info][gc,stats ] Young: Evacuated 408K across 320 objects, abandoned 0B across 0 objects.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27238#issuecomment-3308722358
More information about the hotspot-gc-dev
mailing list