]> git.proxmox.com Git - qemu.git/blob - trace/stderr.c
hw/i386/Makefile.obj: use $(PYTHON) to run .py scripts consistently
[qemu.git] / trace / stderr.c
1 #include "trace.h"
2 #include "trace/control.h"
3
4
5 void trace_print_events(FILE *stream, fprintf_function stream_printf)
6 {
7 TraceEventID i;
8
9 for (i = 0; i < trace_event_count(); i++) {
10 TraceEvent *ev = trace_event_id(i);
11 stream_printf(stream, "%s [Event ID %u] : state %u\n",
12 trace_event_get_name(ev), i, trace_event_get_state_dynamic(ev));
13 }
14 }
15
16 void trace_event_set_state_dynamic_backend(TraceEvent *ev, bool state)
17 {
18 ev->dstate = state;
19 }
20
21 bool trace_backend_init(const char *events, const char *file)
22 {
23 if (file) {
24 fprintf(stderr, "error: -trace file=...: "
25 "option not supported by the selected tracing backend\n");
26 return false;
27 }
28 trace_backend_init_events(events);
29 return true;
30 }