JDK-8325139 : JFR SwapSpace event - add free swap space information on Linux when running in a container environment
Type:Enhancement
Component:hotspot
Sub-Component:runtime
Affected Version:23
Priority:P4
Status:Resolved
Resolution:Fixed
OS:linux
CPU:generic
Submitted:2024-02-01
Updated:2024-06-04
Resolved:2024-03-05
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.
The JFR SwapSpace event (added by JDK-8324287) has been added but in a Linux containerized environment we currently just report -1, this should be enhanced.
Comments
[~mbeasken] There appears to be a bug in this code. See JDK-8333522.
A pull request was submitted for review.
URL: https://git.openjdk.org/jdk/pull/17966
Date: 2024-02-22 15:32:27 +0000
22-02-2024
I don't think this is a JFR issue, the way how the current swap space event works, is that it's using Hotspot API to get the swap space. The Hotspot API, specifically OSContainer API needs to get enhanced to report the swap space (current usage). Then it should be fairly easy to determine the free portion of it. So to me this is a hotspot runtime issue, or at least this bug may need a "supporting" enhancement in hotspot runtime first to add the missing code, then use it from the JFR event (this bug).