On Thu, 2 Apr 2026 08:43:43 GMT, Kevin Walls <[email protected]> wrote:

> Hi,
> 
> Maybe it's a good time to bring up that it's odd to have System.map and 
> System.dump_map, i.e. two commands for the same thing. If it was an optional 
> dump filename, these would be one command?

I added these as separate commands because this is what Thread.print/dump does. 

> 
> If System.map has the filename as an optional (positional) argument, it can't 
> have a default output filename. But having a default filename doesn't seem 
> very important.
> 
> I realise we also have Thread.dump_to_file and that is an example of a 
> command very similar to another command, which outputs to a file. But that 
> doesn't mean having a different command to choose to write out to a file is a 
> good pattern, it doesn't scale well if various commands want to optionally 
> write to a file (we could double the number of jcmds!).

Hmm. Sure, we could fix this if necessary.

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

PR Comment: https://git.openjdk.org/jdk/pull/30497#issuecomment-4178689261

Reply via email to