SWDEV-478762+FEAT-62196: Fix crash on AQL replay (#104)

* SWDEV-478762: Fix crash on replay

* Fix iteration range

* Format

* Refactor

* Addressing review comments

* Address review comments

* Formatting

* Format

* Refactor

---------

Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>

[ROCm/rocprofiler-sdk commit: 1f01526eed]
This commit is contained in:
Baraldi, Giovanni
2025-01-17 19:23:48 +01:00
committed by GitHub
parent eaaeafbfa4
commit 69d94c65a8
2 changed files with 14 additions and 0 deletions
@@ -1366,6 +1366,12 @@ tool_init(rocprofiler_client_finalize_t fini_func, void* tool_data)
_fut.wait_for(std::chrono::seconds{1}); // wait for a max of 1 second
}
// Handle kernel id of zero
bool include = std::regex_search("0", std::regex(tool::get_config().kernel_filter_include));
bool exclude = std::regex_search("0", std::regex(tool::get_config().kernel_filter_exclude));
if(include && (!exclude || tool::get_config().kernel_filter_exclude.empty()))
add_kernel_target(0, tool::get_config().kernel_filter_range);
tool_metadata->process_id = getpid();
rocprofiler_get_timestamp(&(tool_metadata->process_start_ns));