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
Dieser Commit ist enthalten in:
marantic-amd
2025-12-22 12:47:35 +01:00
committet von GitHub
Ursprung 7da3275b42
Commit ba1380a75d
36 geänderte Dateien mit 557 neuen und 183 gelöschten Zeilen
@@ -120,6 +120,31 @@ cache_stop(const char* name)
rocprofsys::trait::name<CategoryT>::value);
}
}
/// Flush all pending cached entries for this thread.
/// Called during finalization to ensure entries that were started but not stopped
/// (e.g., main entry point) are written to the trace cache.
inline void
flush_pending_cached_entries()
{
const auto end_ts = static_cast<timestamp_t>(rocprofsys::comp::wall_clock::record());
uint64_t thread_id = 0;
const auto& extended_info = rocprofsys::thread_info::get(std::this_thread::get_id());
if(extended_info.has_value() && extended_info->index_data.has_value())
{
constexpr size_t UNKNOWN_TIME = 0;
thread_id = extended_info->index_data->system_value;
rocprofsys::trace_cache::get_metadata_registry().add_thread_info(
{ getppid(), getpid(), thread_id, UNKNOWN_TIME, UNKNOWN_TIME, "{}" });
}
for(const auto& [key, start_ts] : map_name_to_args)
{
cache_region(thread_id, key.name, start_ts, end_ts, key.category);
}
map_name_to_args.clear();
}
} // namespace
namespace tim