On Mon, 30 Mar 2026 12:36:55 GMT, Thomas Stuefe <[email protected]> wrote:
> Some small QOL improvement and trivial fixes: > - System.dump_map now takes the filename as a positional argument, which > makes for less awkward handling > - System.dump_map now allows %t as a placeholder in its filename, and the > default filename now contains a timestamp (reusing the logic in > `make_log_name` for this) > - `make_log_name` returns a C-heap allocated array and therefore should not > return a `const char*` but a `char*`. > - Used the more common - in our code base - `_WINDOWS` instead of `_WIN64` > - Removed the "(linux, Windows and MacOS only)" output since this code never > runs on other platforms (not compiled for AIX or *BSD) > - since the filename argument has a default value if omitted by the user, it > can never be empty - assert that instead of doing runtime checks I hope I didn't slow this down. This is of course good. System.dump_map was the only command that took "-F filename" to specify an output file, or even used an option for an output filename I think, so good to remove that (and maybe in future we can avoid multiple commands just because they may write to a file). Would be great to update src/jdk.jcmd/share/man/jcmd.md , including to add %t in the filename description for this jcmd. The default filename doesn't have to include %t but I think you're suggesting it's required often enough to be the default (people frequently make multiple dump_map calls over time). This does change a command-line interface to a jdk/bin command so a CSR should really be used. It should be routine and uncontroversial, it's making the interface more consistent. I think that would be for the removal of -F only. ------------- PR Review: https://git.openjdk.org/jdk/pull/30497#pullrequestreview-4083540789
