RFR: 8342818: Implement CPU Time Profiling for JFR [v17]

Markus Grönlund mgronlun at openjdk.org
Fri Nov 8 09:56:58 UTC 2024


On Thu, 7 Nov 2024 15:11:00 GMT, Johannes Bechberger <jbechberger at openjdk.org> wrote:

>> This is the code for the [JEP draft: CPU Time based profiling for JFR].
>
> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Don't treat stackTrace attribute specially for CPUTimeSamples

A fatal error has been detected by the Java Runtime Environment:
Internal Error (/open/src/hotspot/share/oops/accessBackend.cpp:180), pid=482941, tid=483074
assert(state == _thread_in_vm || state == _thread_in_Java || state == _thread_new) failed: Wrong thread state for accesses: 10

---------------  T H R E A D  ---------------

Current thread (0x00007f868c0043d0):  JavaThread "ForkJoinPool-1-worker-10" daemon [_thread_blocked, id=483074, stack(0x00007f87607c9000,0x00007f87608c9000) (1024K)]

Stack: [0x00007f87607c9000,0x00007f87608c9000],  sp=0x00007f87608c4e10,  free space=1007k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x34c9b9]  AccessInternal::check_access_thread_state()+0xb9  (accessBackend.cpp:180)
V  [libjvm.so+0xa920d6]  ContinuationWrapper::ContinuationWrapper(oop)+0x1e6  (accessBackend.hpp:447)
V  [libjvm.so+0xa8cce1]  Continuation::top_frame(frame const&, RegisterMap*)+0x161  (continuation.cpp:182)
V  [libjvm.so+0x84784e]  frame::sender_for_compiled_frame(RegisterMap*) const+0x9e  (frame_x86.inline.hpp:421)
V  [libjvm.so+0xf9f9d0]  JfrVframeStream::next_vframe()+0x550  (frame_x86.inline.hpp:373)
V  [libjvm.so+0xf096b7]  JfrAsyncStackTrace::record_async(JavaThread*, frame const&)+0x127  (jfrAsyncStackTrace.cpp:92)
V  [libjvm.so+0xf0c038]  JfrCPUTimeThreadSampler::handle_timer_signal(void*)+0x498  (jfrCPUTimeThreadSampler.cpp:211)
V  [libjvm.so+0xf0c14f]  handle_timer_signal(int, siginfo*, void*)+0x4f  (jfrCPUTimeThreadSampler.cpp:704)
C  [libpthread.so.0+0x12d70]
V  [libjvm.so+0x1479ed6]  Mutex::lock(Thread*)+0x86  (mutex.cpp:125)
V  [libjvm.so+0x11e003d]  JvmtiExport::cleanup_thread(JavaThread*)+0x3d  (mutexLocker.hpp:213)
V  [libjvm.so+0x1228e9a]  JvmtiVTMSTransitionDisabler::VTMS_vthread_end(_jobject*)+0x7a  (jvmtiThreadState.cpp:607)
V  [libjvm.so+0x1041ae4]  JVM_VirtualThreadEnd+0xc4  (jvm.cpp:3902)
J 2261  java.lang.VirtualThread.notifyJvmtiEnd()V java.base at 24-internal (0 bytes) @ 0x00007f87e03c2c30 [0x00007f87e03c2ba0+0x0000000000000090]
J 2476 c1 java.lang.VirtualThread$VThreadContinuation$1.run()V java.base at 24-internal (39 bytes) @ 0x00007f87d8ab61fc [0x00007f87d8ab60c0+0x000000000000013c]
J 143  jdk.internal.vm.Continuation.enterSpecial(Ljdk/internal/vm/Continuation;ZZ)V java.base at 24-internal (0 bytes) @ 0x00007f87e02e95b3 [0x00007f87e02e9440+0x0000000000000173]
J 2358 c1 jdk.internal.vm.Continuation.run()V java.base at 24-internal (586 bytes) @ 0x00007f87d8a8eb54 [0x00007f87d8a8e860+0x00000000000002f4]
J 2717 c2 java.lang.VirtualThread.runContinuation()V java.base at 24-internal (132 bytes) @ 0x00007f87e0412ffc [0x00007f87e0412dc0+0x000000000000023c]
J 2403 c2 java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Ljava/util/concurrent/ForkJoinTask;I)V java.base at 24-internal (34 bytes) @ 0x00007f87e03d84a4 [0x00007f87e03d82e0+0x00000000000001c4]
j  java.util.concurrent.ForkJoinPool.runWorker(Ljava/util/concurrent/ForkJoinPool$WorkQueue;)V+366 java.base at 24-internal
j  java.util.concurrent.ForkJoinWorkerThread.run()V+31 java.base at 24-internal
v  ~StubRoutines::call_stub 0x00007f87dfd49d01
V  [libjvm.so+0xec524c]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x48c  (javaCalls.cpp:421)
V  [libjvm.so+0xec5943]  JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x373  (javaCalls.cpp:329)
V  [libjvm.so+0xec5e46]  JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x76  (javaCalls.cpp:191)
V  [libjvm.so+0x103d943]  thread_entry(JavaThread*, JavaThread*)+0x93  (jvm.cpp:2911)
V  [libjvm.so+0xefc36c]  JavaThread::thread_main_inner()+0xcc  (javaThread.cpp:759)
V  [libjvm.so+0x1836206]  Thread::call_run()+0xb6  (thread.cpp:234)
V  [libjvm.so+0x15145a8]  thread_native_entry(Thread*)+0x128  (os_linux.cpp:858)
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 2261  java.lang.VirtualThread.notifyJvmtiEnd()V java.base at 24-internal (0 bytes) @ 0x00007f87e03c2bfe [0x00007f87e03c2ba0+0x000000000000005e]
J 2476 c1 java.lang.VirtualThread$VThreadContinuation$1.run()V java.base at 24-internal (39 bytes) @ 0x00007f87d8ab61fc [0x00007f87d8ab60c0+0x000000000000013c]
J 143  jdk.internal.vm.Continuation.enterSpecial(Ljdk/internal/vm/Continuation;ZZ)V java.base at 24-internal (0 bytes) @ 0x00007f87e02e95b3 [0x00007f87e02e9440+0x0000000000000173]
J 2358 c1 jdk.internal.vm.Continuation.run()V java.base at 24-internal (586 bytes) @ 0x00007f87d8a8eb54 [0x00007f87d8a8e860+0x00000000000002f4]
J 2717 c2 java.lang.VirtualThread.runContinuation()V java.base at 24-internal (132 bytes) @ 0x00007f87e0412ffc [0x00007f87e0412dc0+0x000000000000023c]
J 2403 c2 java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Ljava/util/concurrent/ForkJoinTask;I)V java.base at 24-internal (34 bytes) @ 0x00007f87e03d84a4 [0x00007f87e03d82e0+0x00000000000001c4]
j  java.util.concurrent.ForkJoinPool.runWorker(Ljava/util/concurrent/ForkJoinPool$WorkQueue;)V+366 java.base at 24-internal
j  java.util.concurrent.ForkJoinWorkerThread.run()V+31 java.base at 24-internal
v  ~StubRoutines::call_stub 0x00007f87dfd49d01

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20752#issuecomment-2464275393


More information about the hotspot-dev mailing list