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
Este commit está contenido en:
Xianwei Zhang
2020-07-07 15:39:08 -04:00
cometido por Evgeny
padre 2a7f77b290
commit 61c9df4631
Se han modificado 6 ficheros con 154 adiciones y 23 borrados
+3
Ver fichero
@@ -1402,6 +1402,9 @@ extern "C" PUBLIC_API void OnLoadToolProp(rocprofiler_settings_t* settings)
fflush(stdout);
const uint32_t features_found = metrics_vec.size() + traces_found;
// set a value to indicate tracing mode
if (settings->k_concurrent != 0) settings->k_concurrent = (traces_found == 0) ? 1 : 2;
if (is_spm_trace) {
for (uint32_t index = 0; index < features_found; index++) {
features[index].kind = ROCPROFILER_FEATURE_KIND_TRACE;