On Fri, 14 Nov 2025 18:03:30 GMT, Vladimir Kozlov <[email protected]> wrote:

>> Mat Carter has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Document use of DiagnosticCommand
>
> src/hotspot/share/services/diagnosticCommand.cpp line 996:
> 
>> 994:     output()->print_cr("Error! Not a recording run");
>> 995:     return;
>> 996:   }
> 
> First, is `output()` directed to VM's tty or somewhere else?
> 
> Second, I think you need to be more verbose in error. Maybe:
> 
> Error: AOT recording is not initiated. VM flags -XX:AOTMode=record or 
> -XX:AOTCacheOutput=<file> are missing.

There are two cases:

1) When using jcmd the output is piped back from the VM to the jcmd process 
which in turn outputs the message to tty
2) When invoked using the DiagnosticCommandBean the output is piped back to the 
bean itself and returned as a string from the invoke method

These two cases are demonstrated in the included tests

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27965#discussion_r2543798637

Reply via email to