RFR: JDK-8296784: Provide clean mallinfo/mallinfo2 wrapper for Linux glibc platforms [v3]
Thomas Stuefe
stuefe at openjdk.org
Sat Nov 19 07:21:28 UTC 2022
> This is a breakout from [JDK-8293114](https://bugs.openjdk.org/browse/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 provides a clean wrapper to hide that twiddling from the end caller.
>
> Patch also fixes a display error that may have caused omission of the "may have wrapped" marker in the hs-err printout of the malloc load.
>
> Also, gtest regression test.
Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
- Merge branch 'master' into JDK-8296784-mallinfo-wrapper-breakout
- Feedback roman, martin
- mallinfo-wrapper
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/11088/files
- new: https://git.openjdk.org/jdk/pull/11088/files/ff26a182..62a54537
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=11088&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=11088&range=01-02
Stats: 29800 lines in 834 files changed: 11950 ins; 14686 del; 3164 mod
Patch: https://git.openjdk.org/jdk/pull/11088.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11088/head:pull/11088
PR: https://git.openjdk.org/jdk/pull/11088
More information about the hotspot-runtime-dev
mailing list