RFR: JDK-8286198: [linux] Fix process-memory information
Matthias Baesken
mbaesken at openjdk.java.net
Tue May 10 13:31:53 UTC 2022
On Thu, 5 May 2022 14:55:01 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> We use mallinfo/mallinfo2 to obtain information about the glibc used memory, but there is an error which causes it to be correct only for fine granular malloc allocations. glibc puts larger allocations in mmap-allocated areas, which were missing from the old calculation.
>
> This patch fixes that; it also adds information about memory retained in the glibc after free. Note that the latter unfortunately does not follow glibc trims because trimming is done AFAIK with madvice(MADV_DONTNEED) which does not seem to affect glibc internal bookkeeping. Still its a very valuable thing to know in order to estimate glibc overhead especially in fine granular mass allocation scenarios.
>
> Tests: Lots of manual tests with various malloc loads and granularities, in addition to automated tests.
Marked as reviewed by mbaesken (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/8553
More information about the hotspot-runtime-dev
mailing list