On Tue, 7 Jul 2026 09:51:50 GMT, Kevin Walls <[email protected]> wrote:

> This test fails quite frequently on Windows, with Serial GC.
> Timer granularity seems to be the problem, no cpu time is counted.
> 
> This change is a simple increase in work done to make the cpu time get 
> counted as >0 on on Windows.
> Made it a platform-specific increase in work to not slow the test 
> unnecessarily, e.g. avoid a significant elapsed time change on some test 
> variations on Linux.
> 
> ---------
> - [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: 5cf67d03
Author:    Kevin Walls <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/5cf67d03882844a2d9e6d1364072f5492ea36233
Stats:     14 lines in 1 file changed: 9 ins; 0 del; 5 mod

8386833: java/lang/management/MemoryMXBean/TestGetTotalGcCpuTime.java#Serial 
fails with "Some GC CPU time must have been reported" exception

Reviewed-by: jnorlinder, sspitsyn

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

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

Reply via email to