RFR: 8372008: TestGetTotalGcCpuTime test failures on Windows (Some GC CPU time must have been reported) [v3]

Kevin Walls kevinw at openjdk.org
Tue Nov 18 09:42:22 UTC 2025


On Tue, 18 Nov 2025 09:06:24 GMT, Jonas Norlinder <jnorlinder at openjdk.org> wrote:

>> Current trivial test for `TestGetTotalGcCpuTime` fails as some OSs may have a slower update rate for the underlying CPU time thread counters than the code anticipated, causing the test to fail which assumes that some work have been performed and the count should be non-zero.
>> 
>> Solution: All GCs we are testing are tracing GCs. Therefore, add some marking job to inflate the GC CPU time such that we can guarantee to observe a non-zero value.
>
> Jonas Norlinder has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Prevent escaping: no shadowing

Looks good. Runs many times for me, I let it go for 15 iterations with jtreg.
Then I let it run for 4 iterations with -Xcomp and over 20 with -XX:-TieredCompilation

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

PR Comment: https://git.openjdk.org/jdk/pull/28362#issuecomment-3546490368


More information about the serviceability-dev mailing list