SWDEV-351980 - Consolidate registration tables in the roctracer library

Remove the activity_prof::CallbacksTable. The table was redundant with
the information already stored in the roctracer library. Instead use a
single callback into the roctracer library to query whether the activity
is enabled, and to report it.

Change-Id: I2e05b0881bb4a1953c14361d00ea310d02eb6e0c
This commit is contained in:
Laurent Morichetti
2022-08-30 18:38:25 -07:00
committed by Maneesh Gupta
parent e713b5c7d0
commit 52eb28930a
7 changed files with 41 additions and 61 deletions
+2 -1
View File
@@ -25,6 +25,7 @@
#include "device/rocm/rocmemory.hpp"
#include "device/rocm/rocblit.hpp"
#include "device/rocm/roccounters.hpp"
#include "platform/activity.hpp"
#include "platform/kernel.hpp"
#include "platform/context.hpp"
#include "platform/command.hpp"
@@ -172,7 +173,7 @@ bool HsaAmdSignalHandler(hsa_signal_value_t value, void* arg) {
return false;
}
if (ts->gpu()->isProfilerAttached()) {
if (activity_prof::IsEnabled(OP_ID_DISPATCH)) {
amd::Command* head = ts->getParsedCommand();
if (head == nullptr) {
head = ts->command().GetBatchHead();