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
This commit is contained in:
1 parent
2a7f77b290
commit
61c9df4631
6 files changed
+154
-23
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user