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
Esse commit está contido em:
Laurent Morichetti
2022-08-15 12:00:42 -07:00
commit de Maneesh Gupta
commit 4fbae91468
5 arquivos alterados com 181 adições e 178 exclusões
+3 -2
Ver Arquivo
@@ -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());
}
// ================================================================================================