Make support of two timer functions for virtual threads optional:
- GetCurrentThreadCpuTime
- GetThreadCpuTime
To do that we can relax the spec as in patch below:
diff --git a/src/hotspot/share/prims/jvmti.xml b/src/hotspot/share/prims/jvmti.xml
index 4baaca503c0..5f68fc9a7a9 100644
--- a/src/hotspot/share/prims/jvmti.xml
+++ b/src/hotspot/share/prims/jvmti.xml
@@ -11058,7 +11058,8 @@ myInit() {
</parameters>
<errors>
<error id="JVMTI_ERROR_UNSUPPORTED_OPERATION">
- Current thread is a virtual thread.
+ The current thread is a virtual thread and the implementation does not support
+ getting the current thread CPU time when the current thread is a virtual thread.
</error>
</errors>
</function>
@@ -11140,7 +11141,8 @@ myInit() {
</parameters>
<errors>
<error id="JVMTI_ERROR_UNSUPPORTED_OPERATION">
- <paramlink id="thread"/> is a virtual thread.
+ <paramlink id="thread"/> is a virtual thread and the implementation does not
+ support getting the thread CPU time of a virtual thread.
</error>
</errors>
</function>
- GetCurrentThreadCpuTime
- GetThreadCpuTime
To do that we can relax the spec as in patch below:
diff --git a/src/hotspot/share/prims/jvmti.xml b/src/hotspot/share/prims/jvmti.xml
index 4baaca503c0..5f68fc9a7a9 100644
--- a/src/hotspot/share/prims/jvmti.xml
+++ b/src/hotspot/share/prims/jvmti.xml
@@ -11058,7 +11058,8 @@ myInit() {
</parameters>
<errors>
<error id="JVMTI_ERROR_UNSUPPORTED_OPERATION">
- Current thread is a virtual thread.
+ The current thread is a virtual thread and the implementation does not support
+ getting the current thread CPU time when the current thread is a virtual thread.
</error>
</errors>
</function>
@@ -11140,7 +11141,8 @@ myInit() {
</parameters>
<errors>
<error id="JVMTI_ERROR_UNSUPPORTED_OPERATION">
- <paramlink id="thread"/> is a virtual thread.
+ <paramlink id="thread"/> is a virtual thread and the implementation does not
+ support getting the thread CPU time of a virtual thread.
</error>
</errors>
</function>
- csr for
-
JDK-8302616 make JVMTI thread cpu time functions optional for virtual threads
-
- Closed
-
- relates to
-
JDK-8303563 GetCurrentThreadCpuTime and GetThreadCpuTime need further clarification for virtual threads
-
- Resolved
-