Skip to content

Commit 6f5441e

Browse files
committed
GH-549 workaround for GetCurrentThreadCpuTime() not implemented for virtual threads
1 parent 9b5ae53 commit 6f5441e

File tree

1 file changed

+1
-0
lines changed
  • visualvm/libs.profiler/lib.profiler/native/src-jdk15

1 file changed

+1
-0
lines changed

visualvm/libs.profiler/lib.profiler/native/src-jdk15/Timers.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ JNIEXPORT jlong JNICALL Java_org_graalvm_visualvm_lib_jfluid_server_system_Timer
8585
jvmtiError res;
8686

8787
res = (*_jvmti)->GetCurrentThreadCpuTime(_jvmti,&threadTime);
88+
if (res == /* JVMTI_ERROR_UNSUPPORTED_OPERATION */ 73) return -1;
8889
if (res != JVMTI_ERROR_NONE) fprintf(stderr, "Profiler Agent Error: GetCurrentThreadCpuTime failed with %d\n",res);
8990
assert(res == JVMTI_ERROR_NONE);
9091
return threadTime;

0 commit comments

Comments
 (0)