Adding Async output for API Tracing

If rocprofiler_set_api_trace_sync_callback is not called by the API client then it will be automatically saved in the buffer and it will be in async to the user to see the API trace data, sample for async api tracing is added to samples/tracer

Change-Id: I01266a12b0eec172fdcffd7f04c89c2fe96174bb
This commit is contained in:
Ammar ELWazir
2023-04-20 13:29:02 +00:00
committed by Ammar Elwazir
parent 4a33787c01
commit 29b25a3ef5
7 changed files with 116 additions and 8 deletions
+3 -1
View File
@@ -131,7 +131,9 @@ void Session::Start() {
GetFilter(GetFilterIdWithKind(ROCPROFILER_API_TRACE))->GetTraceData();
if (!tracer_started_.load(std::memory_order_release)) {
tracer_ = new tracer::Tracer(
session_id_, GetFilter(GetFilterIdWithKind(ROCPROFILER_API_TRACE))->GetCallback(),
session_id_, (GetFilter(
GetFilterIdWithKind(ROCPROFILER_API_TRACE))->HasCallback() ? GetFilter(
GetFilterIdWithKind(ROCPROFILER_API_TRACE))->GetCallback() : nullptr),
GetFilter(GetFilterIdWithKind(ROCPROFILER_API_TRACE))->GetBufferId(), domains);
tracer_started_.exchange(true, std::memory_order_release);
}