On Fri, 26 Feb 2021 22:46:07 GMT, Ioi Lam <ik...@openjdk.org> wrote: >> Yumin Qi has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains five additional commits >> since the last revision: >> >> - Fix filter more flags to exclude in static dump, add more test cases >> - Merge branch 'master' into jdk-8259070 >> - Fix white space in CDS.java >> - Add function CDS.dumpSharedArchive in java to dump shared archive >> - 8259070: Add jcmd option to dump CDS > > src/hotspot/share/runtime/arguments.cpp line 3525: > >> 3523: os::free(SharedDynamicArchivePath); >> 3524: SharedDynamicArchivePath = nullptr; >> 3525: } > > Is this necessary?
When do dynamic dump, we set SharedDynamicArchivePath to the given file name, after that, restore the original value so free the old one to prevent memory leak. ------------- PR: https://git.openjdk.java.net/jdk/pull/2737