Enable PC sampling to be run alongside ATT. Add ATT to changelog. (#445)
* Enable PC sampling to be run alongside ATT. Add ATT to changelog. * Fix tests * Review comments --------- Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>
This commit is contained in:
@@ -31,6 +31,9 @@ namespace rocprofiler
|
||||
{
|
||||
namespace att_wrapper
|
||||
{
|
||||
// This is used so the first line number dont get skipped because their vaddr==0
|
||||
constexpr uint64_t LINE_OFFSET = 1;
|
||||
|
||||
TEST(att_decoder_waitcnt_test, gfx9)
|
||||
{
|
||||
registration::init_logging();
|
||||
@@ -41,7 +44,7 @@ TEST(att_decoder_waitcnt_test, gfx9)
|
||||
|
||||
auto append_isa = [&](size_t line_number, const char* line) {
|
||||
pcinfo_t pc{};
|
||||
pc.addr = line_number;
|
||||
pc.addr = line_number + LINE_OFFSET;
|
||||
pc.marker_id = 0;
|
||||
|
||||
auto code = std::make_unique<CodeLine>();
|
||||
@@ -83,7 +86,7 @@ TEST(att_decoder_waitcnt_test, gfx9)
|
||||
for(size_t i = 0; i < isa_map.size(); i++)
|
||||
{
|
||||
wave_instruction_t inst{};
|
||||
inst.pc.addr = i;
|
||||
inst.pc.addr = i + LINE_OFFSET;
|
||||
insts.push_back(inst);
|
||||
}
|
||||
}
|
||||
@@ -126,7 +129,7 @@ TEST(att_decoder_waitcnt_test, gfx10)
|
||||
|
||||
auto append_isa = [&](size_t line_number, const char* line) {
|
||||
pcinfo_t pc{};
|
||||
pc.addr = line_number;
|
||||
pc.addr = line_number + LINE_OFFSET;
|
||||
pc.marker_id = 0;
|
||||
|
||||
auto code = std::make_unique<CodeLine>();
|
||||
@@ -173,7 +176,7 @@ TEST(att_decoder_waitcnt_test, gfx10)
|
||||
for(size_t i = 0; i < isa_map.size(); i++)
|
||||
{
|
||||
wave_instruction_t inst{};
|
||||
inst.pc.addr = i;
|
||||
inst.pc.addr = i + LINE_OFFSET;
|
||||
insts.push_back(inst);
|
||||
}
|
||||
|
||||
@@ -219,7 +222,7 @@ TEST(att_decoder_waitcnt_test, gfx12)
|
||||
|
||||
auto append_isa = [&](size_t line_number, const char* line) {
|
||||
pcinfo_t pc{};
|
||||
pc.addr = line_number;
|
||||
pc.addr = line_number + LINE_OFFSET;
|
||||
pc.marker_id = 0;
|
||||
|
||||
auto code = std::make_unique<CodeLine>();
|
||||
@@ -293,7 +296,7 @@ TEST(att_decoder_waitcnt_test, gfx12)
|
||||
for(size_t i = 0; i < isa_map.size(); i++)
|
||||
{
|
||||
wave_instruction_t inst{};
|
||||
inst.pc.addr = i;
|
||||
inst.pc.addr = i + LINE_OFFSET;
|
||||
insts.push_back(inst);
|
||||
}
|
||||
|
||||
@@ -344,7 +347,7 @@ TEST(att_decoder_waitcnt_test, fail_conditions)
|
||||
for(size_t i = 0; i < 10; i++)
|
||||
{
|
||||
wave_instruction_t inst{};
|
||||
inst.pc.addr = i;
|
||||
inst.pc.addr = i + LINE_OFFSET;
|
||||
insts.push_back(inst);
|
||||
}
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user