SWDEV-265287 : integration spmltgen.py script

Change-Id: Ief3e93225fb6660e72a04e4bd4b379262b73c914
这个提交包含在:
Evgeny
2021-04-05 22:50:00 -05:00
提交者 Evgeny Shcherbakov
父节点 429a458cae
当前提交 82d7bb2145
修改 4 个文件,包含 317 行新增0 行删除
+13
查看文件
@@ -460,14 +460,27 @@ void spm_ctrl_start(rocprofiler_feature_t* features, uint32_t features_found) {
rocprofiler_properties_t properties{};
properties.queue_depth = 256;
std::ostringstream oss;
oss << result_prefix << "spm_counters.txt";
FILE* spm_counters_file = fopen(oss.str().c_str(), "w");
if (spm_counters_file == NULL) {
std::ostringstream errmsg;
errmsg << "ROCProfiler: fopen error, file '" << oss.str().c_str() << "'";
perror(errmsg.str().c_str());
abort();
}
for (rocprofiler_feature_t* p = features; p < features + features_found; ++p) {
int val = p->kind;
if (val == ROCPROFILER_FEATURE_KIND_METRIC) {
val = ROCPROFILER_FEATURE_KIND_TRACE | ROCPROFILER_FEATURE_KIND_SPM_MOD;
p->kind = (rocprofiler_feature_kind_t)val;
fprintf(spm_counters_file, "%s\n", p->name);
}
}
fclose(spm_counters_file);
// Creating SPM context
rocprofiler_t* context = NULL;
hsa_status_t status = rocprofiler_open(agent, features, features_found, &context,