2 * Interface for configuring and controlling the state of tracing events.
4 * Copyright (C) 2011-2016 LluĂs Vilanova <vilanova@ac.upc.edu>
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
10 #ifndef TRACE__CONTROL_VCPU_H
11 #define TRACE__CONTROL_VCPU_H
14 #include "event-internal.h"
15 #include "hw/core/cpu.h"
18 * trace_event_get_vcpu_state:
20 * @id: Event identifier name.
22 * Get the tracing state of an event (both static and dynamic) for the given
25 * If the event has the disabled property, the check will have no performance
28 #define trace_event_get_vcpu_state(vcpu, id) \
30 trace_event_get_vcpu_state_dynamic_by_vcpu_id( \
31 vcpu, _ ## id ## _EVENT.vcpu_id))
33 #include "control-internal.h"
36 trace_event_get_vcpu_state_dynamic_by_vcpu_id(CPUState
*vcpu
,
39 /* it's on fast path, avoid consistency checks (asserts) */
40 if (unlikely(trace_events_enabled_count
)) {
41 return test_bit(vcpu_id
, vcpu
->trace_dstate
);