The young generation is the heap area where newly allocated, relatively short-lived objects are collected first. During a G1 young collection, Eden is cleared, surviving objects may enter Survivor regions, and longer-lived objects can be promoted. section 11.1
Read a young-generation collection by checking:
- Whether Eden regions decrease to zero after collection. section 11.1
- Whether Survivor regions increase as surviving objects are retained. section 11.1
- Whether Old regions increase, indicating object promotion. section 11.1
- Whether the pause remains short enough to avoid noticeable disruption. section 11.1
-Xlog:gc*
Enable detailed GC logging with -Xlog:gc* to inspect young collections, evacuation work, region changes, and pause duration. section 11.1
