This is a follow-up to JDK-8302615 where GetCurrentThreadCpuTime and GetThreadCpuTime were changed from being not supported to optional, when called from/with a virtual thread. There are two additional sentences that need adjustment to avoid creating a conflict in the spec.
--- a/src/hotspot/share/prims/jvmti.xml
+++ b/src/hotspot/share/prims/jvmti.xml
@@ -11022,7 +11022,8 @@ myInit() {
the current thread (see
<functionlink id="GetCurrentThreadCpuTimerInfo"/> vs
<functionlink id="GetThreadCpuTimerInfo"/>).
- The current thread may not be a virtual thread. Otherwise, the error code
+ An implementation is not required to support this function
+ when the current thread is a virtual thread, in which case
<errorlink id="JVMTI_ERROR_UNSUPPORTED_OPERATION"></errorlink> will be returned.
On many platforms this call will be equivalent to:
<example>
@@ -11125,7 +11126,8 @@ myInit() {
<jthread null="current" impl="noconvert"/>
<description>
The thread to query.
- The <code>thread</code> may not be a virtual thread. Otherwise, the error code
+ An implementation is not required to support this function
+ when the given thread is a virtual thread, in which case
<errorlink id="JVMTI_ERROR_UNSUPPORTED_OPERATION"></errorlink> will be returned.
</description>
</param>
--- a/src/hotspot/share/prims/jvmti.xml
+++ b/src/hotspot/share/prims/jvmti.xml
@@ -11022,7 +11022,8 @@ myInit() {
the current thread (see
<functionlink id="GetCurrentThreadCpuTimerInfo"/> vs
<functionlink id="GetThreadCpuTimerInfo"/>).
- The current thread may not be a virtual thread. Otherwise, the error code
+ An implementation is not required to support this function
+ when the current thread is a virtual thread, in which case
<errorlink id="JVMTI_ERROR_UNSUPPORTED_OPERATION"></errorlink> will be returned.
On many platforms this call will be equivalent to:
<example>
@@ -11125,7 +11126,8 @@ myInit() {
<jthread null="current" impl="noconvert"/>
<description>
The thread to query.
- The <code>thread</code> may not be a virtual thread. Otherwise, the error code
+ An implementation is not required to support this function
+ when the given thread is a virtual thread, in which case
<errorlink id="JVMTI_ERROR_UNSUPPORTED_OPERATION"></errorlink> will be returned.
</description>
</param>
- csr for
-
JDK-8305617 GetCurrentThreadCpuTime and GetThreadCpuTime need further clarification for virtual threads
-
- Closed
-
- relates to
-
JDK-8302615 make JVMTI thread cpu time functions optional for virtual threads
-
- Resolved
-