RFR: JDK-8286198: [linux] Fix process-memory information
Thomas Stuefe
stuefe at openjdk.java.net
Sun May 8 09:08:48 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.
GHA test error on Windows irrelevant for this patch
-------------
PR: https://git.openjdk.java.net/jdk/pull/8553
More information about the hotspot-runtime-dev
mailing list