From 5b4ddf3afe147913aa577708331074391e16329e Mon Sep 17 00:00:00 2001 From: Nikolay Beloborodov Date: Wed, 26 Feb 2025 12:20:59 +0000 Subject: [PATCH] Add usdt probe to report activity function Currently, if you want to catch any activity in your application, you must install a callback. This works pretty well only when you profile your own application. If you need to profile already existing target applications without making any modifications to their code, you might use bpf and usdt probes. --- rocclr/platform/activity.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rocclr/platform/activity.cpp b/rocclr/platform/activity.cpp index a12110a015..48ec69dbd2 100644 --- a/rocclr/platform/activity.cpp +++ b/rocclr/platform/activity.cpp @@ -24,6 +24,7 @@ #include "platform/command_utils.hpp" #include +#include namespace amd::activity_prof { @@ -58,6 +59,8 @@ void ReportActivity(const amd::Command& command) { return; } + DTRACE_PROBE2(amd_activity_prof, report, operation_id, command); + auto function = report_activity.load(std::memory_order_relaxed); if (!function) return;