JDK-8296784 : Provide clean mallinfo/mallinfo2 wrapper for Linux glibc platforms
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2022-11-10
  • Updated: 2022-11-19
  • Resolved: 2022-11-19
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 20
20 masterFixed
Related Reports
Relates :  
Description
This is a breakout from JDK-8293114, which is starved for reviews. So I attempt to break up that fix into smaller units which are hopefully easier to review separately.

We use the glibc-specific mallinfo/mallinfo2 APIs to query libc internals. These are quite important, since they are the only way to get the malloc load and retained size from the glibc allocator. NMT only reports a tiny part of that (only the user-view of whatever hotspot allocated).

Using these APIs and staying glibc-agnostic requires some twiddling. This patch should provide a wrapper function in os::Linux to hide that twiddling.
Comments
Changeset: 0a3b0fc8 Author: Thomas Stuefe <stuefe@openjdk.org> Date: 2022-11-19 18:06:48 +0000 URL: https://git.openjdk.org/jdk/commit/0a3b0fc8ad2d136586dd38965abfd707f6b440d2
19-11-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11088 Date: 2022-11-10 10:44:55 +0000
10-11-2022