RFR: 8367473: Shenandoah: Make the detailed evacuation metrics a runtime diagnostic option [v5]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Thu Sep 18 18:28:58 UTC 2025
On Thu, 18 Sep 2025 17:33:10 GMT, William Kemper <wkemper at openjdk.org> wrote:
> 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.
> ```
I don't suppose it's advisable to suppress data that's vacuous (pun not intended :), i.e. where no promotions occur in generational mode?
Reviewed and approved. 🚢
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27238#issuecomment-3308984129
More information about the hotspot-gc-dev
mailing list