From 3ab7b64af9b986be7d593cb6ec48e7e237787d5c Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Thu, 7 Dec 2023 11:14:21 +0100 Subject: [PATCH] Use the VM thread state to check for deopt --- ddprof-lib/src/main/cpp/profiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddprof-lib/src/main/cpp/profiler.cpp b/ddprof-lib/src/main/cpp/profiler.cpp index cdd435eb0..c8746f096 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 (vm_thread->osThreadState() == ThreadState::RUNNABLE && (_state == 10 || _state == 11)) { + if (vm_thread->osThreadState() == ThreadState::RUNNABLE && (state == 10 || state == 11)) { return 0; } bool in_java = (state == 8 || state == 9);