From b2af8d128452c4b4c94399f051c3214f11c1dfa9 Mon Sep 17 00:00:00 2001 From: gfxVPLsdm Date: Mon, 12 Jun 2023 17:00:31 +0800 Subject: [PATCH] [Encode] Fix memory growth when perf utility tool is not enabled (#5324) Co-authored-by: walter-bai --- _studio/shared/mfx_logging/src/mfx_utils_perf.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_studio/shared/mfx_logging/src/mfx_utils_perf.cpp b/_studio/shared/mfx_logging/src/mfx_utils_perf.cpp index 9caf2625d8..41b1f8c753 100644 --- a/_studio/shared/mfx_logging/src/mfx_utils_perf.cpp +++ b/_studio/shared/mfx_logging/src/mfx_utils_perf.cpp @@ -71,6 +71,11 @@ std::map> AutoPerfUtility::tid2taskIds; void AutoPerfUtility::SetTaskId(uint32_t id) { + if (!g_perfutility->dwPerfUtilityIsEnabled) + { + return; + } + uint64_t tid = pthread_self(); decltype(tid2taskIds)::iterator it;