aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/mutex-debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/mutex-debug.c')
0 files changed, 0 insertions, 0 deletions
itter Ingo Molnar <mingo@elte.hu> 2009-05-06 04:38:19 -0400 tracing/events: fix concurrent access to ftrace_events list' href='/cgit/cgit.cgi/litmus-rt.git/commit/kernel/trace/trace_event_profile.c?h=wip-shared-lib2&id=20c8928abe70e204bd077ab6cfe23002d7788983'>20c8928abe70
a59fd6027218
af6af30c0fcd
20c8928abe70


ac199db0189c
20c8928abe70
ac199db0189c
20c8928abe70
ac199db0189c





20c8928abe70
a59fd6027218
20c8928abe70



ac199db0189c
20c8928abe70
ac199db0189c
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
31
32
33
34
35
36
37
38
39











                                                                       
                          
 
                                 
                                                          
                                                                     


                                                           
         
                                   
 
                   





                                         
                                 
                                                          



                                                      
         
                                   
 
/*
 * 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;
	int ret = -EINVAL;

	mutex_lock(&event_mutex);
	list_for_each_entry(event, &ftrace_events, list) {
		if (event->id == event_id && event->profile_enable) {
			ret = event->profile_enable(event);
			break;
		}
	}
	mutex_unlock(&event_mutex);

	return ret;
}

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

	mutex_lock(&event_mutex);
	list_for_each_entry(event, &ftrace_events, list) {
		if (event->id == event_id) {
			event->profile_disable(event);
			break;
		}
	}
	mutex_unlock(&event_mutex);
}