]>
Commit | Line | Data |
---|---|---|
9a82b6a5 LV |
1 | #include "trace.h" |
2 | #include "trace/control.h" | |
3 | ||
4 | ||
5 | void trace_print_events(FILE *stream, fprintf_function stream_printf) | |
6 | { | |
c6f18b91 | 7 | TraceEventID i; |
9a82b6a5 | 8 | |
c6f18b91 LV |
9 | for (i = 0; i < trace_event_count(); i++) { |
10 | TraceEvent *ev = trace_event_id(i); | |
9a82b6a5 | 11 | stream_printf(stream, "%s [Event ID %u] : state %u\n", |
c6f18b91 | 12 | trace_event_get_name(ev), i, trace_event_get_state_dynamic(ev)); |
9a82b6a5 LV |
13 | } |
14 | } | |
15 | ||
c6f18b91 | 16 | void trace_event_set_state_dynamic_backend(TraceEvent *ev, bool state) |
9a82b6a5 | 17 | { |
c6f18b91 | 18 | ev->dstate = state; |
9a82b6a5 LV |
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 | } |