diff --git a/src/components/rocm/roc_profiler.c b/src/components/rocm/roc_profiler.c index c6cbc83b0..43a355657 100644 --- a/src/components/rocm/roc_profiler.c +++ b/src/components/rocm/roc_profiler.c @@ -344,9 +344,20 @@ rocp_evt_code_to_info(uint64_t event_code, PAPI_event_info_t *info) sprintf(info->long_descr, "%s", ntv_table_p->events[inf.nameid].descr); break; case (DEVICE_FLAG | INSTAN_FLAG): + { + int i; + char devices[PAPI_MAX_STR_LEN] = { 0 }; + for (i = 0; i < device_table_p->count; ++i) { + if (rocc_dev_check(ntv_table_p->events[inf.nameid].device_map, i)) { + sprintf(devices + strlen(devices), "%i,", i); + } + } + *(devices + strlen(devices) - 1) = 0; sprintf(info->symbol, "%s:device=%i:instance=%i", ntv_table_p->events[inf.nameid].name, inf.device, inf.instance); - sprintf(info->long_descr, "%s", ntv_table_p->events[inf.nameid].descr); + sprintf(info->long_descr, "%s, masks:Mandatory device qualifier [%s]:Mandatory instance qualifier in range [0-%i]", + ntv_table_p->events[inf.nameid].descr, devices, ntv_table_p->events[inf.nameid].instances - 1); break; + } case DEVICE_FLAG: { int i; @@ -358,13 +369,13 @@ rocp_evt_code_to_info(uint64_t event_code, PAPI_event_info_t *info) } *(devices + strlen(devices) - 1) = 0; sprintf(info->symbol, "%s:device=%i", ntv_table_p->events[inf.nameid].name, inf.device); - sprintf(info->long_descr, "%s masks:Mandatory device qualifier [%s]", + sprintf(info->long_descr, "%s, masks:Mandatory device qualifier [%s]", ntv_table_p->events[inf.nameid].descr, devices); break; } case INSTAN_FLAG: sprintf(info->symbol, "%s:instance=%i", ntv_table_p->events[inf.nameid].name, inf.instance); - sprintf(info->long_descr, "%s masks:Mandatory instance qualifier in range [0-%i]", + sprintf(info->long_descr, "%s, masks:Mandatory instance qualifier in range [0-%i]", ntv_table_p->events[inf.nameid].descr, ntv_table_p->events[inf.nameid].instances - 1); break; default: