-
Bug
-
Resolution: Fixed
-
P2
-
19
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8291994 | 20 | Alan Bateman | P2 | Resolved | Fixed | b10 |
JDK-8292152 | 19.0.2 | Alan Bateman | P2 | Resolved | Fixed | b01 |
JDK-8292131 | 19.0.1 | Alan Bateman | P2 | Resolved | Fixed | b06 |
The conformance tests validating the GetThreadCpuTime and GetThreadUserTime fails when run with
Specific VM options: "-XX:+UnlockExperimentalVMOptions -XX:-VMContinuations"
As per the spec - "If the thread of the specified ID is a virtual thread thease methods supposed to return -1."
The tests works fine in general, but fails when run with "-XX:+UnlockExperimentalVMOptions -XX:-VMContinuations"
Attached the code snipped to demonstrate the issue.
Validation logs:
===
Regular Run:
/scratch/jdk-cache/19/31/jdk-19/bin/javac -source 19 --enable-preview TestThreadUserAndCpuTime.java
Note: TestThreadUserAndCpuTime.java uses preview features of Java SE 19.
Note: Recompile with -Xlint:preview for details.
/scratch/jdk-cache/19/31/jdk-19/bin/java --enable-preview TestThreadUserAndCpuTime
OK - Expected
OK - Expected
With operating mode (-XX:+UnlockExperimentalVMOptions -XX:-VMContinuations)
=======
/scratch/jdk-cache/19/31/jdk-19/bin/java --enable-preview -XX:+UnlockExperimentalVMOptions -XX:-VMContinuations TestThreadUserAndCpuTime
Not OK for getThreadUserTime() - expected -1 but returned 0
Not OK for getThreadCpuTime() : expected -1 but returned 344055
====
Specific VM options: "-XX:+UnlockExperimentalVMOptions -XX:-VMContinuations"
As per the spec - "If the thread of the specified ID is a virtual thread thease methods supposed to return -1."
The tests works fine in general, but fails when run with "-XX:+UnlockExperimentalVMOptions -XX:-VMContinuations"
Attached the code snipped to demonstrate the issue.
Validation logs:
===
Regular Run:
/scratch/jdk-cache/19/31/jdk-19/bin/javac -source 19 --enable-preview TestThreadUserAndCpuTime.java
Note: TestThreadUserAndCpuTime.java uses preview features of Java SE 19.
Note: Recompile with -Xlint:preview for details.
/scratch/jdk-cache/19/31/jdk-19/bin/java --enable-preview TestThreadUserAndCpuTime
OK - Expected
OK - Expected
With operating mode (-XX:+UnlockExperimentalVMOptions -XX:-VMContinuations)
=======
/scratch/jdk-cache/19/31/jdk-19/bin/java --enable-preview -XX:+UnlockExperimentalVMOptions -XX:-VMContinuations TestThreadUserAndCpuTime
Not OK for getThreadUserTime() - expected -1 but returned 0
Not OK for getThreadCpuTime() : expected -1 but returned 344055
====
- backported by
-
JDK-8291994 ThreadMXBean.getThread{Cpu,User}Time fails with -XX:-VMContinuations
-
- Resolved
-
-
JDK-8292131 ThreadMXBean.getThread{Cpu,User}Time fails with -XX:-VMContinuations
-
- Resolved
-
-
JDK-8292152 ThreadMXBean.getThread{Cpu,User}Time fails with -XX:-VMContinuations
-
- Resolved
-