Change how cache manager handles child process trace cache for rocpd (#1033)

* Change how cache manager handles child process trace cache

* Sampling and backtrace metrics to cache

* Apply cmake formatting

* Fix parsing of metadata json

* Code clean up

* Fix build nlohmann json from source

* Fix storage parsed finished callback

* Revert sampling for child process

* Change cache file name generating

* Fix thread start stop

* Fix process start end timestamp

* Applied suggestions from code review

* Try with late start of flushing task thread

* Change dockerfiles for ci

* Revert changes on github workflows

* Remove json_fwd.hpp include

* fix dump

* Build nlohmann/json by default

Signed-off-by: David Galiffi <David.Galiffi@amd.com>

* Update location of build artifacts for nlohmann/json

Signed-off-by: David Galiffi <David.Galiffi@amd.com>

* Revert use_output_suffix

* Remove unused logs

* Fix cache store inside counter due to structure change

* Remove decode tests from debian ci

* Fix issue where all databases have the same UUID (#1499)

Co-authored-by: Aleksandar Djordjevic <adjordje@amd.com>

* Removing the cpack and install steps to save space

* Revert "Remove decode tests from debian ci"

This reverts commit ddabf6dd142dcf438e6b8997b8abe86f2c868468.

* Revert "Removing the cpack and install steps to save space"

This reverts commit 973da3a1ba99d99d529af5269d30e177092f9bfa.

* Add prepare-runner job as dependency to clean up the space

* Fix formatting

* Free up even more space

* Remove verbose for workflows

* remove hw_counters from ext_data

* move space clean up inside container

* try to remove external folder to free up space

* Check space

* Refactor Cleanup to it's own step

---------

Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Co-authored-by: David Galiffi <David.Galiffi@amd.com>
Co-authored-by: Aleksandar Djordjevic <aleksandar.djordjevic@amd.com>
Co-authored-by: Aleksandar Djordjevic <adjordje@amd.com>
This commit is contained in:
Milan Radosavljevic
2025-10-24 17:47:15 +02:00
committed by GitHub
parent 4f075902fc
commit 8806be162c
46 changed files with 1502 additions and 1014 deletions
@@ -21,6 +21,7 @@
// SOFTWARE.
#include "library/rocprofiler-sdk/counters.hpp"
#include "core/agent_manager.hpp"
#include "core/trace_cache/cache_manager.hpp"
#include "core/trace_cache/metadata_registry.hpp"
#include "library/rocprofiler-sdk/fwd.hpp"
@@ -117,10 +118,13 @@ counter_event::operator()(const client_data* tool_data, ::perfetto::CounterTrack
const size_t agent_handle = record.record_counter.agent_id.handle;
const size_t value = record.record_counter.counter_value;
auto agent = get_agent_manager_instance().get_agent_by_handle(agent_handle);
trace_cache::get_buffer_storage().store(
trace_cache::entry_type::pmc_event_with_sample, track_name.c_str(),
_timing.start, event_metadata.c_str(), stack_id, parent_stack_id,
correlation_id, call_stack.c_str(), line_info.c_str(), agent_handle,
correlation_id, call_stack.c_str(), line_info.c_str(),
static_cast<uint32_t>(agent.device_id), static_cast<uint8_t>(agent.type),
track_name.c_str(), value);
}
}