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;