summaryrefslogtreecommitdiff
path: root/trace
diff options
context:
space:
mode:
Diffstat (limited to 'trace')
-rw-r--r--trace/control.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/trace/control.h b/trace/control.h
index b931824d60..1903e22975 100644
--- a/trace/control.h
+++ b/trace/control.h
@@ -96,7 +96,7 @@ static const char * trace_event_get_name(TraceEvent *ev);
* trace_event_get_state:
* @id: Event identifier name.
*
- * Get the tracing state of an event (both static and dynamic).
+ * Get the tracing state of an event, both static and the QEMU dynamic state.
*
* If the event has the disabled property, the check will have no performance
* impact.
@@ -105,6 +105,22 @@ static const char * trace_event_get_name(TraceEvent *ev);
((id ##_ENABLED) && trace_event_get_state_dynamic_by_id(id))
/**
+ * trace_event_get_state_backends:
+ * @id: Event identifier name.
+ *
+ * Get the tracing state of an event, both static and dynamic state from all
+ * compiled-in backends.
+ *
+ * If the event has the disabled property, the check will have no performance
+ * impact.
+ *
+ * Returns: true if at least one backend has the event enabled and the event
+ * does not have the disabled property.
+ */
+#define trace_event_get_state_backends(id) \
+ ((id ##_ENABLED) && id ##_BACKEND_DSTATE())
+
+/**
* trace_event_get_vcpu_state:
* @vcpu: Target vCPU.
* @id: Event identifier name.