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.
------------- Commit messages: - remove whitespace - fix array redact and format - add jmap redact - changed heapDumper.cpp dump function to take in redact - add redact option to jcmd line - formatting - redacted heap dump and test Changes: https://git.openjdk.org/jdk/pull/20409/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20409&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8337517 Stats: 287 lines in 13 files changed: 176 ins; 12 del; 99 mod Patch: https://git.openjdk.org/jdk/pull/20409.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20409/head:pull/20409 PR: https://git.openjdk.org/jdk/pull/20409