RFR: 8319055: JCMD should not buffer the whole output of commands
Alan Bateman
alanb at openjdk.org
Tue Feb 4 06:09:10 UTC 2025
On Mon, 3 Feb 2025 20:09:14 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
> > Do you expect there will be follow up work at some point for the commands that upcall to Java and produce a byte[] to return to the tool?
>
> I don't see much need in the functionality now (streaming output is useful for commands which produce lengthy output or take long time to execute), but we can add it if desired - need to wrap native writer to OutputStream and use the stream by java handlers (instead of byte buffer) to write command output.
Thread.dump_to_file is an example that needs this. There will be many more in the future. So while not for this PR we should we thinking about a follow-up to put in the infrastructure to support this.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23405#issuecomment-2632961617
More information about the serviceability-dev
mailing list