On Mon, 3 Feb 2025 20:09:14 GMT, Alex Menkov <amen...@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? > >> 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. @alexmenkov Oh, this is great, many thanks for doing this work! Good explanations too. I had a cursory view over the changes. Will do a more thorough review, and play around with this, when I am back home. With streaming, what is the expected behavior if a command takes too long? Jcmd stops with timeout, and the hotspot JVM then discards the results? Unless the tests are easy to fix, I don't see any problem with just running them in old buffered mode. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23405#issuecomment-2633044064