2 * trace event based perf counter profiling
4 * Copyright (C) 2009 Red Hat Inc, Peter Zijlstra <pzijlstr@redhat.com>
10 int ftrace_profile_enable(int event_id
)
12 struct ftrace_event_call
*event
;
15 mutex_lock(&event_mutex
);
16 list_for_each_entry(event
, &ftrace_events
, list
) {
17 if (event
->id
== event_id
&& event
->profile_enable
) {
18 ret
= event
->profile_enable(event
);
22 mutex_unlock(&event_mutex
);
27 void ftrace_profile_disable(int event_id
)
29 struct ftrace_event_call
*event
;
31 mutex_lock(&event_mutex
);
32 list_for_each_entry(event
, &ftrace_events
, list
) {
33 if (event
->id
== event_id
) {
34 event
->profile_disable(event
);
38 mutex_unlock(&event_mutex
);