Please review this small test fix. With `-XX:ActiveProcessorCount=1`, `HeapDumpParallelTest` incorrectly expects serial dumping, even though it configures two GC workers. The heap dump succeeds, but the test fails because it rejects the parallel dump output.
**Fix:** 1. Identify the target VM's GC from its startup log, including builds that select Serial GC ergonomically. 2. Remove the processor-count check, since two workers can perform a parallel dump even on a single CPU. 3. Request two threads explicitly for the compressed parallel dump case. **Testing:** - Passed with G1, Parallel, Serial, Epsilon, ZGC, and Shenandoah, each with `ActiveProcessorCount=1` and `2`. - `serviceability/dcmd/gc`: 13 passed, 1 skipped, 0 failed. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8384612: Test serviceability/dcmd/gc/HeapDumpParallelTest.java failed on a single core machine Changes: https://git.openjdk.org/jdk/pull/33212/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33212&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8384612 Stats: 10 lines in 1 file changed: 1 ins; 2 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/33212.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33212/head:pull/33212 PR: https://git.openjdk.org/jdk/pull/33212
