-
Sub-task
-
Resolution: Delivered
-
P4
-
25
The periodic sampling functionality in PerfData has been removed, including the StatSampler and its controlling flag `-XX:PerfDataSamplingInterval`.
PerfData sampling was a rarely used mechanism that periodically updated a small set of counters in the PerfData file. For most garbage collectors, like in the G1 and ZGC collectors, it only recorded a timestamp.
With this change:
- Heap usage counters in PerfData for the Serial and Parallel garbage collectors are now only updated after each garbage collection cycle. As a result, the Eden space usage counter (`sun.gc.generation.0.space.0.used`) will always show zero, since the space is empty after collection. Accurate values are still available through tools such as the Java Flight Recorder (JFR) and Java Management Extensions (JMX)
- The `sun.os.hrt.ticks` counter tracking time since JVM startup has been removed. This can instead be derived from `sun.rt.createVmBeginTime`.
- The `-XX:PerfDataSamplingInterval` flag has been made obsolete, and will be removed in a future release.
This change only affects tools that read data directly from the PerfData file. Other monitoring programs and tools remain unaffected.
PerfData sampling was a rarely used mechanism that periodically updated a small set of counters in the PerfData file. For most garbage collectors, like in the G1 and ZGC collectors, it only recorded a timestamp.
With this change:
- Heap usage counters in PerfData for the Serial and Parallel garbage collectors are now only updated after each garbage collection cycle. As a result, the Eden space usage counter (`sun.gc.generation.0.space.0.used`) will always show zero, since the space is empty after collection. Accurate values are still available through tools such as the Java Flight Recorder (JFR) and Java Management Extensions (JMX)
- The `sun.os.hrt.ticks` counter tracking time since JVM startup has been removed. This can instead be derived from `sun.rt.createVmBeginTime`.
- The `-XX:PerfDataSamplingInterval` flag has been made obsolete, and will be removed in a future release.
This change only affects tools that read data directly from the PerfData file. Other monitoring programs and tools remain unaffected.