54extern std::atomic<bool> enabled_flag;
60[[nodiscard]]
inline bool enabled() noexcept {
return detail::enabled_flag.load(std::memory_order_relaxed); }
89void emit(
event const& diagnostic);
Temporarily replace the diagnostic sink and restore it on destruction.
Definition dispatch_diagnostics.hpp:73
scoped_sink(scoped_sink const &)=delete
scoped_sink & operator=(scoped_sink const &)=delete
~scoped_sink()
Definition dispatch_diagnostics.cpp:66
Structured kernel-dispatch failure data.
Definition dispatch_diagnostics.cpp:8
sink current_sink()
Return a copy of the active diagnostic sink.
Definition dispatch_diagnostics.cpp:43
void set_sink(sink replacement)
Replace the process-wide kernel-dispatch diagnostic sink.
Definition dispatch_diagnostics.cpp:30
bool enabled() noexcept
Return whether runtime kernel-dispatch diagnostics are enabled.
Definition dispatch_diagnostics.hpp:60
std::function< void(event const &)> sink
Callable receiving structured dispatch events after backend walks.
Definition dispatch_diagnostics.hpp:50
void reset_sink()
Disable runtime kernel-dispatch diagnostics.
Definition dispatch_diagnostics.cpp:41
constexpr bool kernel_attempt_succeeded(KernelAttempt attempt) noexcept
Return whether a backend performed the operation.
Definition kernel_attempt.hpp:40
Structured result of one ordered kernel-dispatch walk.
Definition dispatch_diagnostics.hpp:24
std::optional< std::string_view > selected_backend() const noexcept
Return the selected backend name, if the dispatch succeeded.
Definition dispatch_diagnostics.hpp:39
std::string operation
Definition dispatch_diagnostics.hpp:25
std::vector< KernelBackendAttempt > backend_attempts
Definition dispatch_diagnostics.hpp:26
bool succeeded() const noexcept
Return whether one backend completed the operation.
Definition dispatch_diagnostics.hpp:29