SWDEV-540648: Adding realtime clock to v3 tool. Update decoder header. (#666)

* SWDEV-540648: Adding realtime clock to v3 tool. Update header for decoder.

* Adding tests

* Review comments

* Review comment
Este commit está contenido en:
Giovanni Lenzi Baraldi
2025-09-10 12:39:27 +02:00
cometido por GitHub
padre 4e9acd492d
commit 9849073836
Se han modificado 18 ficheros con 193 adiciones y 82 borrados
@@ -72,8 +72,7 @@ CodeFile::~CodeFile()
vec.end(),
[](const std::pair<pcinfo_t, std::unique_ptr<CodeLine>>& a,
const std::pair<pcinfo_t, std::unique_ptr<CodeLine>>& b) {
if(a.first.marker_id == b.first.marker_id) return a.first.addr < b.first.addr;
return a.first.marker_id < b.first.marker_id;
return a.first < b.first;
});
std::stringstream ofs;
@@ -92,8 +91,8 @@ CodeFile::~CodeFile()
if(kernel_names.find(pc) != kernel_names.end())
{
csv_encoder::write_row(ofs,
pc.marker_id,
pc.addr,
pc.code_object_id,
pc.address,
"; " + kernel_names.at(pc).name,
0,
0,
@@ -102,8 +101,8 @@ CodeFile::~CodeFile()
kernel_names.at(pc).demangled);
}
csv_encoder::write_row(ofs,
pc.marker_id,
pc.addr,
pc.code_object_id,
pc.address,
line->code_line->inst,
line->hitcount,
line->latency,
@@ -138,16 +137,16 @@ CodeFile::~CodeFile()
{
std::stringstream code;
code << "[\"; " << kernel_names.at(line.first).name << "\",0," << (isa.line_number - 1)
<< ",\"" << kernel_names.at(line.first).demangled << "\"," << line.first.marker_id
<< "," << line.first.addr << ",0,0,0,0]";
<< ",\"" << kernel_names.at(line.first).demangled << "\","
<< line.first.code_object_id << "," << line.first.address << ",0,0,0,0]";
jcode.push_back(nlohmann::json::parse(code.str()));
}
std::stringstream code;
code << "[\"" << isa.code_line->inst << "\",0," << isa.line_number << ",\""
<< isa.code_line->comment << "\"," << line.first.marker_id << "," << line.first.addr
<< "," << isa.hitcount << "," << isa.latency << "," << isa.stall << "," << isa.idle
<< "]";
<< isa.code_line->comment << "\"," << line.first.code_object_id << ","
<< line.first.address << "," << isa.hitcount << "," << isa.latency << "," << isa.stall
<< "," << isa.idle << "]";
jcode.push_back(nlohmann::json::parse(code.str()));