RFR: 8319055: JCMD should not buffer the whole output of commands
Alex Menkov
amenkov at openjdk.org
Tue Feb 4 19:51:26 UTC 2025
On Tue, 4 Feb 2025 06:06:18 GMT, Alan Bateman <alanb 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.
We have [JDK-8336723](https://bugs.openjdk.org/browse/JDK-8336723) to implement streaming output for commands implemented in java. This PR is lower level and provides functionality required for JDK-8336723
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23405#issuecomment-2634917509
More information about the hotspot-runtime-dev
mailing list