RFR: 8319873: Add windows implementation for jcmd System.map and System.dump_map [v9]
Thomas Stuefe
stuefe at openjdk.org
Wed Sep 11 14:16:08 UTC 2024
On Wed, 11 Sep 2024 13:32:49 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/16663332/vm_memory_map_760.txt)
>
> Simon Tooke has updated the pull request incrementally with two additional commits since the last revision:
>
> - prevent VM crash on invalid jcmd
> - changes from review
No problem. Small nit, otherwise still fine.
src/hotspot/share/services/diagnosticCommand.cpp line 1196:
> 1194: void SystemDumpMapDCmd::execute(DCmdSource source, TRAPS) {
> 1195: const char* name = _filename.value();
> 1196: if (name == NULL || *name == 0) {
Can you please change this to `(*name) == '\0'` or `name[0] == '\0'` ?
-------------
PR Review: https://git.openjdk.org/jdk/pull/20597#pullrequestreview-2297241233
PR Review Comment: https://git.openjdk.org/jdk/pull/20597#discussion_r1754694818
More information about the serviceability-dev
mailing list