Revert "[ARM] pxa: fix Verdex Pro mmc initialization"
[linux-2.6/verdex.git] / kernel / trace / trace_event_profile.c
blob11ba5bb4ed0a71f0c3da5e8a2ce73471456aec47
1 /*
2 * trace event based perf counter profiling
4 * Copyright (C) 2009 Red Hat Inc, Peter Zijlstra <pzijlstr@redhat.com>
6 */
8 #include "trace.h"
10 int ftrace_profile_enable(int event_id)
12 struct ftrace_event_call *event;
13 int ret = -EINVAL;
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);
19 break;
22 mutex_unlock(&event_mutex);
24 return ret;
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);
35 break;
38 mutex_unlock(&event_mutex);