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]
Αυτή η υποβολή περιλαμβάνεται σε:
authored and GitHub committed 2024-12-06 00:05:30 -06:00
1 γονέας a79f8a0198
υποβολή 792329fefd
23 files changed
+564 -248

No files matched your search

@@ -35,7 +35,7 @@ def test_memory_allocation(json_data):
_, bf_op_names = get_operation(data, "MEMORY_ALLOCATION")
assert len(bf_op_names) == 4
assert len(bf_op_names) == 5
allocation_reported_agent_ids = set()
# check buffering data
@@ -49,12 +49,12 @@ def test_memory_allocation(json_data):
assert "thread_id" in node
assert "agent_id" in node
assert "starting_address" in node
assert "address" in node
assert "allocation_size" in node
assert node.size > 0
assert node.allocation_size > 0
assert node.starting_address > 0
assert node.allocation_size >= 0
assert len(node.address) > 0
assert node.thread_id > 0
assert node.agent_id.handle > 0
assert node.start_timestamp > 0
@@ -69,14 +69,6 @@ def test_memory_allocation(json_data):
allocation_reported_agent_ids.add(node["agent_id"]["handle"])
assert 2**64 - 1 not in allocation_reported_agent_ids
def test_perfetto_data(pftrace_data, json_data):
import rocprofiler_sdk.tests.rocprofv3 as rocprofv3
rocprofv3.test_perfetto_data(pftrace_data, json_data, ("memory_allocation",))
def test_otf2_data(otf2_data, json_data):
import rocprofiler_sdk.tests.rocprofv3 as rocprofv3