SWDEV-492625 memory free functions (#11)

* SWDEV-492625: Track free memory HSA functions to help determine total amount of memory allocated on the system at any one time

* Minor fixes to address comments

* Update allocation size description

* Moved get function back to specialization, minor typo fixes

* Removed memory_operation_type field, removed memory_pool allocation enum, converted starting address to hex string for json format.

* Made conversion to hex_string a function, changed address to use union rocprofiler_address_t type, changed VMEM descriptors

* Removed as_hex from the global namespace

* Formatting

* Removed TRACK_EVENT for memory allocation, now TRACK_COUNTER for memory allocation is being performed

* Check if address was recorded before retrieving allocation size in generate Perfetto

* Formatting

* Update source/lib/output/generatePerfetto.cpp

* Explicitly disable app-abort tests

* Remove excluding app-abort test from workflow CI

- redundant bc these tests are explicitly marked as disabled now

---------

Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: 79006bb896]
This commit is contained in:
Trowbridge, Ian
2024-12-06 00:05:30 -06:00
committed by GitHub
parent a79f8a0198
commit 792329fefd
23 changed files with 564 additions and 248 deletions
@@ -242,12 +242,12 @@ def test_summary_display_data(json_data, summary_data):
assert get_dims(marker) == [7, 9], f"{marker}"
assert get_dims(memcpy) == [2, 9], f"{memcpy}"
assert get_dims(memalloc) == [1, 9], f"{memalloc}"
assert get_dims(memalloc) == [2, 9], f"{memalloc}"
assert get_dims(dispatch) == [3, 9], f"{dispatch}"
assert get_dims(dispatch_and_copy) == [5, 9], f"{dispatch_and_copy}"
assert get_dims(hip) == [14, 9], f"{hip}"
assert get_dims(hip_and_marker) == expected_hip_and_marker_dims, f"{hip_and_marker}"
assert get_dims(total) == [24, 9], f"{total}"
assert get_dims(total) == [25, 9], f"{total}"
def test_perfetto_data(pftrace_data, json_data):
@@ -256,7 +256,7 @@ def test_perfetto_data(pftrace_data, json_data):
rocprofv3.test_perfetto_data(
pftrace_data,
json_data,
("hip", "marker", "kernel", "memory_copy", "memory_allocation"),
("hip", "marker", "kernel", "memory_copy"),
)