JDK-8215647 : Write all old object samples event outside safepoint
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 13
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-12-19
  • Updated: 2025-08-28
  • Resolved: 2019-11-12
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 14
14Resolved
Related Reports
Duplicate :  
Description
JFR writes old object samples in a safepoint. This is because the heap needs to be traversed to find paths to the gc roots. Due to the overhead, the path to gc roots functionality is disabled in the default configuration - only object class, thread and allocation timestamp are written.

Still, the code runs in a safepoint, albeit a very short one. It would be possible to eliminate the safepoint (unless the heap is traversed) and instead take the allocation sample lock to prevent the object samples list to be modified concurrently
Comments
This was fixed with the integration of Event Streaming,. See JDK-8226511
12-11-2019