On Mon, 5 Oct 2026 16:25:36 GMT, Yunbo Zhang <[email protected]> wrote:

> 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).

This pull request has now been integrated.

Changeset: dac55987
Author:    Yunbo Zhang <[email protected]>
Committer: Serguei Spitsyn <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/dac5598774a02c6787bffae5236bf14974a270c2
Stats:     10 lines in 1 file changed: 1 ins; 2 del; 7 mod

8384612: Test serviceability/dcmd/gc/HeapDumpParallelTest.java failed on a 
single core machine

Reviewed-by: lmesnik, sspitsyn

-------------

PR: https://git.openjdk.org/jdk/pull/33212

Reply via email to