hw/timer: add allwinner a10 timer
[qemu.git] / trace / stderr.c
blobe212efd64d1466f465cd4b6adac7a8a7d3edca5b
1 #include "trace.h"
2 #include "trace/control.h"
5 void trace_print_events(FILE *stream, fprintf_function stream_printf)
7 TraceEventID i;
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));
16 void trace_event_set_state_dynamic_backend(TraceEvent *ev, bool state)
18 ev->dstate = state;
21 bool trace_backend_init(const char *events, const char *file)
23 if (file) {
24 fprintf(stderr, "error: -trace file=...: "
25 "option not supported by the selected tracing backend\n");
26 return false;
28 trace_backend_init_events(events);
29 return true;