]>
Commit | Line | Data |
---|---|---|
e4858974 LV |
1 | /* |
2 | * Interface for configuring and controlling the state of tracing events. | |
3 | * | |
4 | * Copyright (C) 2011 Lluís Vilanova <[email protected]> | |
5 | * | |
6 | * This work is licensed under the terms of the GNU GPL, version 2. See | |
7 | * the COPYING file in the top-level directory. | |
8 | */ | |
9 | ||
10 | #ifndef TRACE_CONTROL_H | |
11 | #define TRACE_CONTROL_H | |
12 | ||
fc764105 LV |
13 | #include "qemu-common.h" |
14 | ||
15 | ||
16 | /** Print the state of all events. */ | |
17 | void trace_print_events(FILE *stream, fprintf_function stream_printf); | |
18 | /** Set the state of an event. | |
19 | * | |
20 | * @return Whether the state changed. | |
21 | */ | |
22 | bool trace_event_set_state(const char *name, bool state); | |
e4858974 LV |
23 | |
24 | ||
25 | /** Initialize the tracing backend. | |
26 | * | |
23d15e86 LV |
27 | * @events Name of file with events to be enabled at startup; may be NULL. |
28 | * Corresponds to commandline option "-trace events=...". | |
29 | * @file Name of trace output file; may be NULL. | |
30 | * Corresponds to commandline option "-trace file=...". | |
e4858974 LV |
31 | * @return Whether the backend could be successfully initialized. |
32 | */ | |
23d15e86 LV |
33 | bool trace_backend_init(const char *events, const char *file); |
34 | ||
35 | /** Generic function to initialize the state of events. | |
36 | * | |
37 | * @fname Name of file with events to enable; may be NULL. | |
38 | */ | |
39 | void trace_backend_init_events(const char *fname); | |
e4858974 LV |
40 | |
41 | #endif /* TRACE_CONTROL_H */ |