]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - tools/perf/util/trace-event.c
a155a77f30230ede0e7c928da6d2bc7b45c252dc
[mirror_ubuntu-artful-kernel.git] / tools / perf / util / trace-event.c
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 }