RFR: 8322475: Extend printing for System.map [v6]
Severin Gehwolf
sgehwolf at openjdk.org
Tue Jul 2 15:17:28 UTC 2024
On Thu, 20 Jun 2024 09:31:48 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> This is an expansion on the new `System.map` command introduced with JDK-8318636.
>>
>> We now print valuable information per memory region, such as:
>>
>> - the actual resident set size
>> - the actual number of huge pages
>> - the actual used page size
>> - the THP state of the region (was advised, is eligible, uses THP, ...)
>> - whether the region is shared
>> - whether the region had been committed (backed by swap)
>> - whether the region has been swapped out.
>>
>> Example output:
>>
>> [system-map-thp1.txt](https://github.com/user-attachments/files/15587748/system-map-thp1.txt)
>>
>>
>> from to size rss hugetlb pgsz prot notes vm info/file
>> 0x00000000c0000000 - 0x00000000ffe00000 1071644672 0 4194304 2M rw-p huge JAVAHEAP /anon_hugepage
>> 0x00000000ffe00000 - 0x0000000100000000 2097152 0 0 2M rw-p huge JAVAHEAP /anon_hugepage
>> 0x0000558016b67000 - 0x0000558016b68000 4096 4096 0 4K r--p /shared/projects/openjdk/jdk-jdk/output-fastdebug/images/jdk/bin/java
>> 0x0000558016b68000 - 0x0000558016b69000 4096 4096 0 4K r-xp /shared/projects/openjdk/jdk-jdk/output-fastdebug/images/jdk/bin/java
>> 0x00007f3a749f2000 - 0x00007f3a74c62000 2555904 2555904 0 4K rwxp CODE(CodeHeap 'profiled nmethods')
>> 0x00007f3a74c62000 - 0x00007f3a7be51000 119468032 0 0 4K ---p nores CODE(CodeHeap 'profiled nmethods')
>> 0x00007f3a7be51000 - 0x00007f3a7c1c1000 3604480 3604480 0 4K rwxp CODE(CodeHeap 'profiled nmethods')
>> 0x00007f3a7c1c1000 - 0x00007f3a7c592000 4001792 0 0 4K ---p nores CODE(CodeHeap 'non-nmethods')
>> 0x00007f3a7c592000 - 0x00007f3a7c802000 2555904 2...
>
> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 23 commits:
>
> - feedback johan
> - fix merge errors
> - Merge branch 'master' into System.maps-more-info
> - copyrights
> - Merge branch 'master' into System.maps-more-info
> - fix merge issue
> - Merge branch 'master' into System.maps-more-info
> - fix whitespace issue
> - wip
> - exhuming
> - ... and 13 more: https://git.openjdk.org/jdk/compare/c6f3bf4b...940199de
This seems fine. Mostly nits.
src/hotspot/os/linux/procMapsParser.hpp line 66:
> 64: from = to = nullptr;
> 65: prot[0] = filename[0] = '\0';
> 66: kernelpagesize = rss = private_hugetlb = anonhugepages = swap = 0;
`private_hugetlb` and `shared_hugetlb` missing in reset. Intentional?
src/hotspot/share/nmt/memMapPrinter.cpp line 262:
> 260: print_thread_details_for_supposed_stack_address(vma_from, vma_to, _out);
> 261: }
> 262: num_printed ++;
Style: No space before `++`.
test/hotspot/jtreg/serviceability/dcmd/vm/SystemDumpMapTest.java line 31:
> 29:
> 30: import java.io.*;
> 31: import java.lang.StringBuilder;
Nit: `java.lang.*` are imported by default. I don't see it used, so maybe a left over?
test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java line 53:
> 51: regexBase_committed + "\\[stack\\]",
> 52: // we should see the hs-perf data file, and it should appear as shared as well as committed
> 53: regexBase_shared_and_committed + "hsperfdata_.*"
Suggestion: Should the test run with `-XX:+UsePerfData` since it's expecting this file. It's default on, but that might change.
-------------
PR Review: https://git.openjdk.org/jdk/pull/17158#pullrequestreview-2154058332
PR Review Comment: https://git.openjdk.org/jdk/pull/17158#discussion_r1662723988
PR Review Comment: https://git.openjdk.org/jdk/pull/17158#discussion_r1662661856
PR Review Comment: https://git.openjdk.org/jdk/pull/17158#discussion_r1662705054
PR Review Comment: https://git.openjdk.org/jdk/pull/17158#discussion_r1662700550
More information about the hotspot-dev
mailing list