JDK-8355937 : Release Note: Removal of PerfData Sampling
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2025-04-29
  • Updated: 2025-06-04
  • Resolved: 2025-06-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25Resolved
Description
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.
Comments
Fixed one typo but otherwise also looks good to me.
03-06-2025

Looks good to me.
03-06-2025