From fba0d6ba762e0aea15814c480e328dac7af7ea7e Mon Sep 17 00:00:00 2001 From: "Madsen, Jonathan" Date: Thu, 13 Feb 2025 12:39:10 -0600 Subject: [PATCH] SWDEV-514449: Fix missing thread pre/post callbacks (#204) * SWDEV-514449: Fix missing thread pre/post callbacks - invoke pre/post-callback around internal thread creation * Update changelog --------- Co-authored-by: Jonathan R. Madsen [ROCm/rocprofiler-sdk commit: 0d7ca72d846e029cfa56afe162e81f804d1871a7] --- projects/rocprofiler-sdk/CHANGELOG.md | 2 ++ .../source/lib/rocprofiler-sdk/counters/sample_consumer.hpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/projects/rocprofiler-sdk/CHANGELOG.md b/projects/rocprofiler-sdk/CHANGELOG.md index 0f52f8235c..c9de549160 100644 --- a/projects/rocprofiler-sdk/CHANGELOG.md +++ b/projects/rocprofiler-sdk/CHANGELOG.md @@ -165,4 +165,6 @@ Full documentation for ROCprofiler-SDK is available at [rocm.docs.amd.com/projec ### Resolved issues +- Fixed missing callbacks around internal thread creation within counter collection service + ### Removed diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/sample_consumer.hpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/sample_consumer.hpp index 01d60f6e18..86fb20a451 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/sample_consumer.hpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/sample_consumer.hpp @@ -23,6 +23,7 @@ #pragma once #include "lib/rocprofiler-sdk/counters/sample_processing.hpp" +#include "lib/rocprofiler-sdk/internal_threading.hpp" #include #include @@ -49,7 +50,9 @@ public: if(valid.exchange(true)) return; exited.store(false); + internal_threading::notify_pre_internal_thread_create(ROCPROFILER_LIBRARY); consumer = std::thread{&consumer_thread_t::consumer_loop, this}; + internal_threading::notify_post_internal_thread_create(ROCPROFILER_LIBRARY); } void exit()