RFR: 8319873: Add windows implementation for jcmd System.map and System.dump_map [v11]

Sonia Zaldana Calles szaldana at openjdk.org
Thu Sep 12 16:05:25 UTC 2024


On Thu, 12 Sep 2024 14:04:54 GMT, Simon Tooke <stooke at openjdk.org> wrote:

>> This is a port of [JDK-8318636](https://github.com/openjdk/jdk/pull/16301) to Windows.
>> 
>> System.map and System.dump_map are implemented using the Windows API and provide roughly the same information in the same format.  Most of the heavy lifting was implemented by @tstuefe in #16301 - this PR adds the Windows implementation and enables the common code for Windows 64 bit.
>>  
>> [Sample output (with NMT enabled)](https://github.com/user-attachments/files/16982072/sample_windows_map.txt)
>
> Simon Tooke has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - remove calls to fatal(), remove segment lengt output
>  - use nullptr insted of NULL

Looks good to me.

src/hotspot/os/windows/memMapPrinter_windows.cpp line 212:

> 210:     //            0x00007ffd5bd64000-0x00007ffd5c250000      5160960 r---  c-img 0x10d4000 C:\work\jdk\build\work-fastdebug\jdk\bin\server\jvm.dll
> 211:     st->print_cr("from               to                 prot  state    offset vminfo/file");
> 212:     st->print_cr("=======================================================================");

I think the extended "===" in the header was okay :-)

-------------

Marked as reviewed by szaldana (Committer).

PR Review: https://git.openjdk.org/jdk/pull/20597#pullrequestreview-2300784332
PR Review Comment: https://git.openjdk.org/jdk/pull/20597#discussion_r1757165436


More information about the serviceability-dev mailing list