RFR: 8367302: New test jdk/jfr/event/profiling/TestCPUTimeSampleQueueAutoSizes.java from JDK-8366082 is failing
Andrei Pangin
apangin at openjdk.org
Thu Sep 18 02:09:36 UTC 2025
On Thu, 18 Sep 2025 01:55:28 GMT, Andrei Pangin <apangin at openjdk.org> wrote:
>> This change hopefully fixes the test failures by making the test cases more resilient.
>
> test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleQueueAutoSizes.java line 154:
>
>> 152: ThreadMXBean bean = ManagementFactory.getThreadMXBean();
>> 153: long start = bean.getCurrentThreadCpuTime();
>> 154: while (bean.getCurrentThreadCpuTime() - start < millis * 1_000_000) {
>
> Isn't this method supposed to check CPU time of the passed `thread` rather than current thread?
BTW, is there a specific reason to burn cpu in a separate thread? It can be done in the same `main` thread, isn't it?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27293#discussion_r2357283696
More information about the hotspot-jfr-dev
mailing list