General fixes to ATT, packets and event ID retrieval (#960)
* General fixes to ATT, packets and event ID retrieval * Update source/lib/rocprofiler-sdk/hsa/aql_packet.hpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
1 orang tua
498b1f2bd7
melakukan
4e2144dbfa
7 files changed
+50
-71
No files matched your search
@@ -195,24 +195,22 @@ getMetricIdMap()
|
||||
return id_map;
|
||||
}
|
||||
|
||||
const MetricIdMap*
|
||||
std::unordered_map<uint64_t, int>
|
||||
getPerfCountersIdMap()
|
||||
{
|
||||
// Only GFX9 counters in SQ Block are supported
|
||||
static MetricIdMap*& att_perf_counters_map =
|
||||
common::static_object<MetricIdMap>::construct([]() {
|
||||
MetricIdMap map;
|
||||
std::string agent_prefix{"gfx9"};
|
||||
auto is_gfx9 = [&](auto& agent_name) {
|
||||
return (agent_name.find(agent_prefix) != std::string::npos);
|
||||
};
|
||||
for(const auto& [agent_name, metrics] : *CHECK_NOTNULL(getMetricMap()))
|
||||
if(is_gfx9(agent_name))
|
||||
for(const auto& metric : metrics)
|
||||
if(metric.block() == "SQ") map.emplace(metric.id(), metric);
|
||||
return map;
|
||||
}());
|
||||
return att_perf_counters_map;
|
||||
std::unordered_map<uint64_t, int> map;
|
||||
|
||||
for(const auto& [agent, list] : *CHECK_NOTNULL(getMetricMap()))
|
||||
{
|
||||
if(agent.find("gfx9") == std::string::npos) continue;
|
||||
for(const auto& metric : list)
|
||||
{
|
||||
if(metric.name().find("SQ_") == 0 && !metric.event().empty())
|
||||
map.emplace(metric.id(), std::stoi(metric.event()));
|
||||
}
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
const MetricMap*
|
||||
|
||||
@@ -119,10 +119,10 @@ const MetricIdMap*
|
||||
getMetricIdMap();
|
||||
|
||||
/**
|
||||
* Get the metrics for perfcounters options in thread trace
|
||||
* Get the metric event ids for perfcounters options in thread trace
|
||||
* applicable only for GFX9 agents and SQ block counters
|
||||
*/
|
||||
const MetricIdMap*
|
||||
std::unordered_map<uint64_t, int>
|
||||
getPerfCountersIdMap();
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user