SWDEV-335780 - Indicate if handler is queued

Maintain status of handler callback. For event records we no longer
submit callbacks to reduce the load on the async handler thread. However
without a callback we leak command memory/decrement refcounts. Indicate
status of the handler which we can use to queue a callback when
finish is called.

Change-Id: I89fd02f3d047a0e8162664ee17581a14795f1928


[ROCm/clr commit: 5df34a2f7a]
This commit is contained in:
Saleel Kudchadker
2022-06-13 14:33:25 -07:00
parent acf2856677
commit b3ad41f6e4
6 changed files with 20 additions and 5 deletions
@@ -446,11 +446,12 @@ hsa_signal_t VirtualGPU::HwQueueTracker::ActiveSignal(
ClPrint(amd::LOG_INFO, amd::LOG_SIG, "Set Handler: handle(0x%lx), timestamp(%p)",
prof_signal->signal_.handle, prof_signal);
}
SetHandlerPending(false);
// Update the current command/marker with HW event
prof_signal->retain();
ts->command().SetHwEvent(prof_signal);
} else if (ts->command().profilingInfo().marker_ts_) {
SetHandlerPending(true);
// Update the current command/marker with HW event
prof_signal->retain();
ts->command().SetHwEvent(prof_signal);