From 6da2b19562db75c8a8d9a282fe59d69173b2d092 Mon Sep 17 00:00:00 2001 From: Chun Yang Date: Mon, 10 May 2021 22:06:17 -0700 Subject: [PATCH] SWDEV-283942 : Fixed false error report from rocprofiler Change-Id: Ifc6eb0cb26f60a5596e1b626a578135ae9080f26 --- src/core/intercept_queue.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/intercept_queue.h b/src/core/intercept_queue.h index e639ba9d0c..4890c18bdf 100644 --- a/src/core/intercept_queue.h +++ b/src/core/intercept_queue.h @@ -154,6 +154,12 @@ class InterceptQueue { std::lock_guard lck(mutex_); hsa_status_t status = HSA_STATUS_SUCCESS; + if (GetObj(queue) == nullptr) { + /* This isn't an intercept queue managed by the rocprofiler, call the original function to + destroy this queue. */ + return hsa_queue_destroy_fn(queue); + } + if (callbacks_.destroy != NULL) { status = callbacks_.destroy(queue, callback_data_); } @@ -608,7 +614,7 @@ class InterceptQueue { assert(queue == obj->queue_); delete obj; obj_map_->erase(it); - status = HSA_STATUS_SUCCESS;; + status = HSA_STATUS_SUCCESS; } return status; }