diff --git a/ddprof-lib/src/main/cpp/profiler.cpp b/ddprof-lib/src/main/cpp/profiler.cpp index b175f8052..cdd435eb0 100644 --- a/ddprof-lib/src/main/cpp/profiler.cpp +++ b/ddprof-lib/src/main/cpp/profiler.cpp @@ -404,7 +404,7 @@ int Profiler::getJavaTraceAsync(void* ucontext, ASGCT_CallFrame* frames, int max }; */ // avoid unwinding during deoptimization - if (_state == 10 || _state == 11) { + if (vm_thread->osThreadState() == ThreadState::RUNNABLE && (_state == 10 || _state == 11)) { return 0; } bool in_java = (state == 8 || state == 9);