Jiri Olsa | 29f5ffd | 2013-12-03 14:09:23 +0100 | [diff] [blame^] | 1 | |
2 | #include <traceevent/event-parse.h> | ||||
3 | #include "trace-event.h" | ||||
4 | |||||
5 | int trace_event__init(struct trace_event *t) | ||||
6 | { | ||||
7 | struct pevent *pevent = pevent_alloc(); | ||||
8 | |||||
9 | if (pevent) { | ||||
10 | t->plugin_list = traceevent_load_plugins(pevent); | ||||
11 | t->pevent = pevent; | ||||
12 | } | ||||
13 | |||||
14 | return pevent ? 0 : -1; | ||||
15 | } | ||||
16 | |||||
17 | void trace_event__cleanup(struct trace_event *t) | ||||
18 | { | ||||
19 | pevent_free(t->pevent); | ||||
20 | traceevent_unload_plugins(t->plugin_list); | ||||
21 | } |