2 #include "trace/control.h"
5 void trace_print_events(FILE *stream
, fprintf_function stream_printf
)
9 for (i
= 0; i
< NR_TRACE_EVENTS
; i
++) {
10 stream_printf(stream
, "%s [Event ID %u] : state %u\n",
11 trace_list
[i
].tp_name
, i
, trace_list
[i
].state
);
15 bool trace_event_set_state(const char *name
, bool state
)
19 bool wildcard
= false;
23 if (len
> 0 && name
[len
- 1] == '*') {
27 for (i
= 0; i
< NR_TRACE_EVENTS
; i
++) {
29 if (!strncmp(trace_list
[i
].tp_name
, name
, len
)) {
30 trace_list
[i
].state
= state
;
35 if (!strcmp(trace_list
[i
].tp_name
, name
)) {
36 trace_list
[i
].state
= state
;
43 bool trace_backend_init(const char *events
, const char *file
)
46 fprintf(stderr
, "error: -trace file=...: "
47 "option not supported by the selected tracing backend\n");
50 trace_backend_init_events(events
);