blob: a155a77f30230ede0e7c928da6d2bc7b45c252dc [file] [log] [blame]
Jiri Olsa29f5ffd2013-12-03 14:09:23 +01001
2#include <traceevent/event-parse.h>
3#include "trace-event.h"
4
5int 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
17void trace_event__cleanup(struct trace_event *t)
18{
19 pevent_free(t->pevent);
20 traceevent_unload_plugins(t->plugin_list);
21}