Revert memory allocation CSV output file header and update tests (#532)

* Reverted header and field location for csv memory allocation and updated tests

* Updated example csv file and made small update

[ROCm/rocprofiler-sdk commit: 533a8329d8]
This commit is contained in:
Trowbridge, Ian
2025-08-04 13:22:27 -05:00
committed by GitHub
parent ea891a16fd
commit 6b2a4fcfc2
6 changed files with 202 additions and 36 deletions
@@ -1,7 +1,5 @@
"Kind","Operation","Agent_Id","Allocation_Size","Address","Correlation_Id","Start_Timestamp","End_Timestamp"
"MEMORY_ALLOCATION","MEMORY_ALLOCATION_ALLOCATE",Agent 0,1024,0x7fb2d0005000,11,3721742710532634,3721742710584854
"MEMORY_ALLOCATION","MEMORY_ALLOCATION_FREE",Agent 0,0,0x7fb2d0005000,12,3721742710596404,3721742710933366
"MEMORY_ALLOCATION","MEMORY_ALLOCATION_ALLOCATE",Agent 0,1024,0x7fb2d0005000,13,3721742710941416,3721742710960916
"MEMORY_ALLOCATION","MEMORY_ALLOCATION_FREE",Agent 0,0,0x7fb2d0005000,14,3721742710967236,3721742711197647
"MEMORY_ALLOCATION","MEMORY_ALLOCATION_ALLOCATE",Agent 0,1024,0x7fb2d0005000,15,3721742711204077,3721742711219717
"MEMORY_ALLOCATION","MEMORY_ALLOCATION_FREE",Agent 0,0,0x7fb2d0005000,16,3721742711225857,3721742711466018
"MEMORY_ALLOCATION","MEMORY_ALLOCATION_ALLOCATE","Agent 0",1024,"0x00007ffb26354000",1,816098791282238,816098791339655
"MEMORY_ALLOCATION","MEMORY_ALLOCATION_ALLOCATE","Agent 0",1024,"0x00007ffb168d6000",2,816098791350331,816098791386746
"MEMORY_ALLOCATION","MEMORY_ALLOCATION_FREE","",0,"0x00007ffb26354000",7,816098791533678,816098791678768
"MEMORY_ALLOCATION","MEMORY_ALLOCATION_FREE","",0,"0x00007ffb168d6000",8,816098791681482,816098791873422
1 Kind Operation Agent_Id Allocation_Size Address Correlation_Id Start_Timestamp End_Timestamp
2 MEMORY_ALLOCATION MEMORY_ALLOCATION_ALLOCATE Agent 0 1024 0x7fb2d0005000 0x00007ffb26354000 11 1 3721742710532634 816098791282238 3721742710584854 816098791339655
3 MEMORY_ALLOCATION MEMORY_ALLOCATION_FREE MEMORY_ALLOCATION_ALLOCATE Agent 0 0 1024 0x7fb2d0005000 0x00007ffb168d6000 12 2 3721742710596404 816098791350331 3721742710933366 816098791386746
4 MEMORY_ALLOCATION MEMORY_ALLOCATION_ALLOCATE MEMORY_ALLOCATION_FREE Agent 0 1024 0 0x7fb2d0005000 0x00007ffb26354000 13 7 3721742710941416 816098791533678 3721742710960916 816098791678768
5 MEMORY_ALLOCATION MEMORY_ALLOCATION_FREE Agent 0 0 0x7fb2d0005000 0x00007ffb168d6000 14 8 3721742710967236 816098791681482 3721742711197647 816098791873422
MEMORY_ALLOCATION MEMORY_ALLOCATION_ALLOCATE Agent 0 1024 0x7fb2d0005000 15 3721742711204077 3721742711219717
MEMORY_ALLOCATION MEMORY_ALLOCATION_FREE Agent 0 0 0x7fb2d0005000 16 3721742711225857 3721742711466018
@@ -472,11 +472,11 @@ generate_csv(const output_config&
{"Kind",
"Operation",
"Agent_Id",
"Allocation_Size",
"Address",
"Correlation_Id",
"Start_Timestamp",
"End_Timestamp",
"Allocation_Size"}};
"End_Timestamp"}};
for(auto ditr : data)
{
for(auto record : data.get(ditr))
@@ -498,11 +498,11 @@ generate_csv(const output_config&
tool_metadata.get_kind_name(record.kind),
api_name,
agent_info,
record.allocation_size,
rocprofiler::sdk::utility::as_hex(record.address.handle, 16),
record.correlation_id.internal,
record.start_timestamp,
record.end_timestamp,
record.allocation_size);
record.end_timestamp);
ofs << row_ss.str();
}