summaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event.c
blob: a155a77f30230ede0e7c928da6d2bc7b45c252dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#include <traceevent/event-parse.h>
#include "trace-event.h"

int trace_event__init(struct trace_event *t)
{
	struct pevent *pevent = pevent_alloc();

	if (pevent) {
		t->plugin_list = traceevent_load_plugins(pevent);
		t->pevent  = pevent;
	}

	return pevent ? 0 : -1;
}

void trace_event__cleanup(struct trace_event *t)
{
	pevent_free(t->pevent);
	traceevent_unload_plugins(t->plugin_list);
}