On Wed, 31 Jul 2024 19:10:41 GMT, Henry Lin <d...@openjdk.org> wrote:
> Adds a command line option `-redact` to `jcmd`, `redact` to `jmap` and > `-XX:+HeapDumpRedacted` enabling redacted heap dumps. When enabled, the > output binary heap dump has zeroes written out in place of the original > primitive values in the object fields. There is a new jtreg test > `heapDumpRedactedTest.java` that tests that the fields are properly redacted. src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java line 142: > 140: */ > 141: InputStream execute(String cmd, Object ... args) throws > AgentLoadException, IOException { > 142: assert args.length <= 4; // includes null I'm pretty sure we've been down this path before, and allowing 4 args will result in newer versions of the JVM not working with older versions of the tool. See [JDK-8219721](https://bugs.openjdk.org/browse/JDK-8219721) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20409#discussion_r1699202345