SWDEV-418738: Listing counters of all GPU agents

Using `gfxip` when listing counters on the system with multi-GPUs
all belonging to the same family results in showing counters
of the first agent multiple times.
Instead, use the agent's `name` to observe counters of all agents.

Change-Id: I7b46c0670bc7c918e2ba0357fa659df9d23379d4


[ROCm/rocprofiler commit: 03a63791b0]
Цей коміт міститься в:
vlaindic
2023-08-24 12:49:12 +02:00
джерело a5006b00c4
коміт 581bf2cd87
2 змінених файлів з 2 додано та 2 видалено
+1 -1
Переглянути файл
@@ -126,7 +126,7 @@ class MetricsDict {
static MetricsDict* Create(const rocprofiler::HSAAgentInfo* agent_info) {
std::lock_guard<mutex_t> lck(mutex_);
if (map_ == NULL) map_ = new map_t;
std::string name = agent_info->GetDeviceInfo().getGfxip();
std::string name = std::string(agent_info->GetDeviceInfo().getName());
auto ret = map_->insert({name, NULL});
if (ret.second) ret.first->second = new MetricsDict(agent_info);
return ret.first->second;
+1 -1
Переглянути файл
@@ -120,7 +120,7 @@ class MetricsDict {
static MetricsDict* Create(const util::AgentInfo* agent_info) {
std::lock_guard<mutex_t> lck(mutex_);
if (map_ == NULL) map_ = new map_t;
auto ret = map_->insert({agent_info->gfxip, NULL});
auto ret = map_->insert({agent_info->name, NULL});
if (ret.second) ret.first->second = new MetricsDict(agent_info);
return ret.first->second;
}