RFR: JDK-8318636: Add jcmd to print annotated process memory map [v5]
Thomas Stuefe
stuefe at openjdk.org
Sat Oct 28 12:53:55 UTC 2023
> Analysts and supporters often use /proc/xx/maps to make sense of the memory footprint of a process.
>
> Interpreting the memory map correctly can help when used as a complement to other tools (e.g. NMT). There even exist tools out there that attempt to annotate the process memory map with JVM information.
>
> That, however, can be more accurately done from within the JVM, at least for mappings originating from hotspot. After all, we can correlate the mapping information in NMT with the VMA map.
>
> Example output (from a spring petstore run):
>
> [example_system_map.txt](https://github.com/openjdk/jdk/files/13179054/example_system_map.txt)
>
> This patch adds the VM annotations for VMAs that are *mmaped*. I also have an experimental patch that works with malloc'ed memory, but it is not ready yet for consumption and I leave that part of for now.
Thomas Stuefe has updated the pull request incrementally with 11 additional commits since the last revision:
- NMT_FLAGS_DO
- small fixes
- adapt test
- remove test code
- Use HANDLE_THREAD
- move to nmt; split out MemFlagBitmap
- Adjust output a la Gerard
- dump to file, not to jcmd output stream
- make it even fasterer
- make it faster
- ... and 1 more: https://git.openjdk.org/jdk/compare/a48b82c2...6033a64c
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16301/files
- new: https://git.openjdk.org/jdk/pull/16301/files/a48b82c2..6033a64c
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16301&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16301&range=03-04
Stats: 874 lines in 16 files changed: 445 ins; 400 del; 29 mod
Patch: https://git.openjdk.org/jdk/pull/16301.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16301/head:pull/16301
PR: https://git.openjdk.org/jdk/pull/16301
More information about the serviceability-dev
mailing list