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:
Giovanni Lenzi Baraldi
2024-07-04 03:58:45 -03:00
committed by GitHub
parent 498b1f2bd7
commit 4e2144dbfa
7 changed files with 50 additions and 71 deletions
@@ -157,11 +157,19 @@ ThreadTraceAQLPacketFactory::ThreadTraceAQLPacketFactory(const hsa::AgentCache&
if(perf_ctrl != 0 && !params.perfcounters.empty())
{
aql_params.push_back(
{HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_PERFCOUNTER_CTRL, {perf_ctrl - 1}});
auto perf_param = HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_PERFCOUNTER_NAME;
for(uint32_t perf_counter : params.perfcounters)
aql_params.push_back({perf_param, {perf_counter}});
for(const auto& perf_counter : params.perfcounters)
{
aqlprofile_att_parameter_t param{};
param.parameter_name = HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_PERFCOUNTER_NAME;
param.counter_id = perf_counter.first;
param.simd_mask = perf_counter.second;
aql_params.push_back(param);
}
aqlprofile_att_parameter_t param{};
param.parameter_name = HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_PERFCOUNTER_CTRL;
param.value = perf_ctrl - 1;
aql_params.push_back(param);
}
}