On Wed, 19 Nov 2025 22:46:32 GMT, Mat Carter <[email protected]> wrote:
>> 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
Updated the message, following convention and not including "Error! .."
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27965#discussion_r2543812881