Put cached perfetto traces as default one (#2138)

* Put cached perfetto traces as default one

* Improve cached data and perfetto traces in order to be more aligned with E2E tests

* Addressing PR comments and findings

* Force early instrumentation bundle instantiation

* Sync-up insturumented containers with thread growth data

* Revert ompvv number of host threads to default 8

* Fixed counter track namings for amd-smi

* AIPROFSYST-34 [rocprof-sys] Update documentation describing newly introduced changes to default tracing mechanism
This commit is contained in:
marantic-amd
2025-12-22 12:47:35 +01:00
committed by GitHub
parent 7da3275b42
commit ba1380a75d
36 changed files with 557 additions and 183 deletions
@@ -533,12 +533,22 @@ void
cache_region(const rocprofiler_callback_tracing_record_t* record,
const rocprofiler_timestamp_t start_timestamp,
const rocprofiler_timestamp_t end_timestamp, const std::string& call_stack,
const std::string& args_str, const std::string& category)
const std::string& args_str, const std::string& category,
std::string_view name = {})
{
auto callback_tracing_info =
trace_cache::get_metadata_registry().get_callback_tracing_info();
auto _name = std::string{ callback_tracing_info.at(record->kind, record->operation) };
// Use provided name if available, otherwise fall back to API operation name
std::string _name;
if(name.empty())
{
auto callback_tracing_info =
trace_cache::get_metadata_registry().get_callback_tracing_info();
_name = std::string{ callback_tracing_info.at(record->kind, record->operation) };
}
else
{
_name = std::string{ name };
}
trace_cache::get_buffer_storage().store(trace_cache::region_sample{
record->thread_id, _name.c_str(), record->correlation_id.internal,
@@ -814,7 +824,7 @@ tool_tracing_callback_stop(
cache_add_thread_info(record.thread_id);
std::string args_str = get_args_string(args);
cache_region(&record, _beg_ts, _end_ts, call_stack.dump(), args_str,
trait::name<CategoryT>::value);
trait::name<CategoryT>::value, _name);
}
}