aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_event_profile.c
blob: 199de9c7422965e0700d5ea64fe8182200319c8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * trace event based perf counter profiling
 *
 * Copyright (C) 2009 Red Hat Inc, Peter Zijlstra <pzijlstr@redhat.com>
 *
 */

#include "trace.h"

int ftrace_profile_enable(int event_id)
{
	struct ftrace_event_call *event;

	for_each_event(event) {
		if (event->id == event_id)
			return event->profile_enable(event);
	}

	return -EINVAL;
}

void ftrace_profile_disable(int event_id)
{
	struct ftrace_event_call *event;

	for_each_event(event) {
		if (event->id == event_id)
			return event->profile_disable(event);
	}
}