]> git.proxmox.com Git - mirror_qemu.git/blame - trace/event-internal.h
Merge tag 'pull-tcg-20230620' of https://gitlab.com/rth7680/qemu into staging
[mirror_qemu.git] / trace / event-internal.h
CommitLineData
45be2f5d
LV
1/*
2 * Interface for configuring and controlling the state of tracing events.
3 *
17f7ac75 4 * Copyright (C) 2012-2016 Lluís Vilanova <vilanova@ac.upc.edu>
45be2f5d
LV
5 *
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 */
9
10#ifndef TRACE__EVENT_INTERNAL_H
11#define TRACE__EVENT_INTERNAL_H
12
ef4c9fc8
DB
13/*
14 * Special value for TraceEvent.vcpu_id field to indicate
15 * that the event is not VCPU specific
16 */
17#define TRACE_VCPU_EVENT_NONE ((uint32_t)-1)
18
45be2f5d
LV
19/**
20 * TraceEvent:
21 * @id: Unique event identifier.
22 * @name: Event name.
23 * @sstate: Static tracing state.
93977402
DB
24 * @dstate: Dynamic tracing state
25 *
26 * Interpretation of @dstate depends on whether the event has the 'vcpu'
27 * property:
28 * - false: Boolean value indicating whether the event is active.
29 * - true : Integral counting the number of vCPUs that have this event enabled.
45be2f5d
LV
30 *
31 * Opaque generic description of a tracing event.
32 */
33typedef struct TraceEvent {
a82417b5 34 uint32_t id;
45be2f5d
LV
35 const char * name;
36 const bool sstate;
93977402 37 uint16_t *dstate;
45be2f5d
LV
38} TraceEvent;
39
a4d50b1d 40void trace_event_set_state_dynamic_init(TraceEvent *ev, bool state);
45be2f5d 41
175de524 42#endif /* TRACE__EVENT_INTERNAL_H */