JDK-8324287 : Record total and free swap space in JFR
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 23
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2024-01-22
  • Updated: 2024-03-03
  • Resolved: 2024-02-01
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 23
23 b09Fixed
Related Reports
Relates :  
Relates :  
Description
Total and free swap space should be recorded in JFR, because it is important to know e.g. in case of memory shortages.

Currently we only have a container related event (ContainerMemoryUsage) that provides some info but no general event.
PhysicalMemory could be enhanced or a new event added.

There is already some coding (see Java_com_sun_management_internal_OperatingSystemImpl_getTotalSwapSpaceSize0 and
Java_com_sun_management_internal_OperatingSystemImpl_getFreeSwapSpaceSize0)  for the swap space info retrieval.


Comments
Changeset: cab74b07 Author: Matthias Baesken <mbaesken@openjdk.org> Date: 2024-02-01 12:50:18 +0000 URL: https://git.openjdk.org/jdk/commit/cab74b075e4572529a21bf8ac652ec2f1ab4fcaf
01-02-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/17581 Date: 2024-01-26 07:54:22 +0000
26-01-2024

A separate event would probably be best.
23-01-2024