RFR: 8372008: TestGetTotalGcCpuTime test failures on Windows (Some GC CPU time must have been reported) [v3]
Jonas Norlinder
jnorlinder at openjdk.org
Tue Nov 18 09:06:29 UTC 2025
On Tue, 18 Nov 2025 08:47:47 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Jonas Norlinder has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Prevent escaping: no shadowing
>
> test/jdk/java/lang/management/MemoryMXBean/TestGetTotalGcCpuTime.java line 106:
>
>> 104: objs.add(new Object());
>> 105: }
>> 106: System.gc();
>
> No concern that escape analysis will eliminate the allocations here?
>
> Minor nit, should use 4-space indentation here.
Thanks Alan. I believe this didn't happen with the current implementation. That being said, I reached out to @robcasloz to get his opinion if there are any risks.
FWIW; I added objs as a private static field.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28362#discussion_r2536969057
More information about the serviceability-dev
mailing list