Enable queue interception with scratch reporting (#1069)
* Enable queue interception with scratch reporting Scratch reporting reports agent ID in buffer and callback records, but HSA runtime provides only queue ID in the scratch callback. This change enables queue interception when scratch reporting is requested * Validation test for rocprofv3 + scratch-memory-trace * Simplify checks for whether context is tracing a domain * Update changelog --------- Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
This commit is contained in:
@@ -427,5 +427,25 @@ deregister_client_contexts(rocprofiler_client_id_t client_id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename KindT>
|
||||
bool
|
||||
context::is_tracing(KindT _kind) const
|
||||
{
|
||||
constexpr auto is_callback_tracing =
|
||||
std::is_same<KindT, rocprofiler_callback_tracing_kind_t>::value;
|
||||
constexpr auto is_buffered_tracing =
|
||||
std::is_same<KindT, rocprofiler_buffer_tracing_kind_t>::value;
|
||||
static_assert(is_callback_tracing || is_buffered_tracing, "Unsupported domain type");
|
||||
|
||||
if constexpr(is_callback_tracing)
|
||||
return (callback_tracer && callback_tracer->domains(_kind));
|
||||
else if constexpr(is_buffered_tracing)
|
||||
return (buffered_tracer && buffered_tracer->domains(_kind));
|
||||
}
|
||||
|
||||
// explicitly instantiate
|
||||
template bool context::is_tracing(rocprofiler_callback_tracing_kind_t) const;
|
||||
template bool context::is_tracing(rocprofiler_buffer_tracing_kind_t) const;
|
||||
} // namespace context
|
||||
} // namespace rocprofiler
|
||||
|
||||
Reference in New Issue
Block a user