From 39db6d842fc1c398082ba94de18b81cbc0eab156 Mon Sep 17 00:00:00 2001 From: "Baraldi, Giovanni" Date: Wed, 29 Jan 2025 20:06:32 +0100 Subject: [PATCH] Fix for ATT context stop while packets are being processed (#171) Fix for context stop while packets are being processed Co-authored-by: Giovanni Baraldi --- source/lib/rocprofiler-sdk/thread_trace/att_core.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lib/rocprofiler-sdk/thread_trace/att_core.cpp b/source/lib/rocprofiler-sdk/thread_trace/att_core.cpp index 3a1fa5d56c..8f24f97f16 100644 --- a/source/lib/rocprofiler-sdk/thread_trace/att_core.cpp +++ b/source/lib/rocprofiler-sdk/thread_trace/att_core.cpp @@ -456,6 +456,8 @@ DispatchThreadTracer::start_context() void DispatchThreadTracer::stop_context() // NOLINT(readability-convert-member-functions-to-static) { + CHECK_NOTNULL(hsa::get_queue_controller())->disable_serialization(); + client.wlock([&](auto& client_id) { if(!client_id) return; @@ -463,8 +465,6 @@ DispatchThreadTracer::stop_context() // NOLINT(readability-convert-member-funct CHECK_NOTNULL(hsa::get_queue_controller())->remove_callback(*client_id); client_id = std::nullopt; }); - - CHECK_NOTNULL(hsa::get_queue_controller())->disable_serialization(); } void