On Wed, 9 Feb 2022 19:38:43 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
>> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> updated test > > test/hotspot/jtreg/serviceability/HeapDump/DuplicateArrayClassesTest.java > line 58: > >> 56: String[][][] strArray = new String[0][][]; >> 57: LingeredApp.main(args); >> 58: System.out.println("" + intArray + strArray); // to be sure >> the classes are not unloaded > > Use Reference.reachabilityFence(<array>); Fixed > test/hotspot/jtreg/serviceability/HeapDump/DuplicateArrayClassesTest.java > line 86: > >> 84: Process p = ProcessTools.startProcess("jcmd", new >> ProcessBuilder(launcher.getCommand())); >> 85: // If something goes wrong with heap dumping most likely >> we'll get crash of the target VM. >> 86: while (!p.waitFor(5, TimeUnit.SECONDS)) { > > 5 seconds seems kind of short. Doesn't allow for occasional network hiccups. Note that this is a cycle. It ensures target VM (theApp) is not terminated while jcmd (p) processes the command. I had some experience in the past when jcmd didn't exit if target VM crashes. > test/hotspot/jtreg/serviceability/HeapDump/DuplicateArrayClassesTest.java > line 218: > >> 216: } >> 217: >> 218: // Reads the whole HPROF_GC_CLASS_DUMP record, returns closs ID. > > "class ID" Fixed. ------------- PR: https://git.openjdk.java.net/jdk/pull/7384