pmc: add support of concurrent kernel profiling

The profiling was only enabled in serial mode, i.e., kernels
are serialized in execution, and counters are reset at each
kernel start and read at kernel completion. This patch adds
the concurrent mode, by issuing the process-level start
packet to reset counters, and then reading twice at kernel
start and end time to obtain the counter value difference.
The new concurrent profiling usage needs the integration
with the corresponding augment at aqlprofile side.

Change-Id: I94b4442eadc8c64b8fba51b1e4916fc8b895ad21


[ROCm/rocprofiler commit: 61c9df4631]
This commit is contained in:
Xianwei Zhang
2020-07-07 15:39:08 -04:00
zatwierdzone przez Evgeny
rodzic 3d44ea1a05
commit f95b383dfa
6 zmienionych plików z 154 dodań i 23 usunięć
@@ -42,7 +42,7 @@ InterceptQueue::queue_id_t InterceptQueue::current_queue_id = 0;
rocprofiler_hsa_callback_fun_t InterceptQueue::submit_callback_fun_ = NULL;
void* InterceptQueue::submit_callback_arg_ = NULL;
bool InterceptQueue::k_concurrent_ = false;
bool InterceptQueue::opt_mode_ = false;
uint32_t InterceptQueue::k_concurrent_ = K_CONC_OFF;
std::once_flag InterceptQueue::once_flag_;
} // namespace rocprofiler