SWDEV-351980 - Move activity_ to the ProfilingInfo

The activity_ is only instantiated if profiling is enabled.

Remove the HIP private global record ID. Instead, use the correlation ID
stored in the hip_api_data_t by the profiler while the last HIP function
is in scope.

For NDRange and Copy commands, store the kernel name and byte size
(respectively) in the record.

General cleanups to improve the code's readability.

Change-Id: I01907484b0d9611eb9440c3a7c4865479dc42289


[ROCm/clr commit: 4fbae91468]
This commit is contained in:
Laurent Morichetti
2022-08-15 12:00:42 -07:00
committed by Maneesh Gupta
parent 939199b98f
commit cbcc94b9e3
5 changed files with 181 additions and 178 deletions
+3 -2
View File
@@ -162,7 +162,9 @@ bool Event::setStatus(int32_t status, uint64_t timeStamp) {
releaseResources();
}
activity_.ReportEventTimestamps(command());
if (profilingInfo().enabled_)
activity_prof::CallbacksTable::reportActivity(command());
// Broadcast all the waiters.
if (referenceCount() > 1) {
signal();
@@ -323,7 +325,6 @@ Command::Command(HostQueue& queue, cl_command_type type,
for (const auto &event: eventWaitList) {
event->retain();
}
if (type != 0) activity_.Initialize(type, queue.vdev()->index(), queue.device().index());
}
// ================================================================================================