RFR: 8366065: ZGC: Differentiate Young Collection type strings in ZGC statistics

Joel Sikström jsikstro at openjdk.org
Thu Aug 28 12:28:19 UTC 2025


Hello,

Currently, two different Young Collection (YC) types print identical strings in the GC statistics at the end of `-Xlog:gc*`. This makes it difficult to distinguish statistics for specific YC types when analyzing logs for performance issues. This PR updates the strings to match the `ZYoungType` enum names, improving traceability and making logs clearer.

Relevant enum for reference:
```c++
enum class ZYoungType {
  minor,
  major_full_preclean,
  major_full_roots,
  major_partial_roots,
  none
};


Testing:
* GHA

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

Commit messages:
 - 8366065: ZGC: Differentiate Young Collection type strings in statistics

Changes: https://git.openjdk.org/jdk/pull/26986/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26986&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8366065
  Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/26986.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26986/head:pull/26986

PR: https://git.openjdk.org/jdk/pull/26986


More information about the hotspot-gc-dev mailing list