trace: break circular dependency in event-internal.h
[qemu.git] / trace / event-internal.h
blob58f05517457ec010e0bdb132c3982fdc397c7d2f
1 /*
2 * Interface for configuring and controlling the state of tracing events.
4 * Copyright (C) 2012-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.
8 */
10 #ifndef TRACE__EVENT_INTERNAL_H
11 #define TRACE__EVENT_INTERNAL_H
13 /**
14 * TraceEvent:
15 * @id: Unique event identifier.
16 * @vcpu_id: Unique per-vCPU event identifier.
17 * @name: Event name.
18 * @sstate: Static tracing state.
19 * @dstate: Dynamic tracing state
21 * Interpretation of @dstate depends on whether the event has the 'vcpu'
22 * property:
23 * - false: Boolean value indicating whether the event is active.
24 * - true : Integral counting the number of vCPUs that have this event enabled.
26 * Opaque generic description of a tracing event.
28 typedef struct TraceEvent {
29 uint32_t id;
30 uint32_t vcpu_id;
31 const char * name;
32 const bool sstate;
33 uint16_t *dstate;
34 } TraceEvent;
36 void trace_event_set_state_dynamic_init(TraceEvent *ev, bool state);
38 #endif /* TRACE__EVENT_INTERNAL_H */