diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 15:02:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 15:02:25 -0500 |
commit | da184a8064efe2a78d8542877970f7c6bb62775a (patch) | |
tree | d10193bb583f60333e243fe46386cab31f591e0c /kernel/trace/trace_event_profile.c | |
parent | 525995d77ca08dfc2ba6f8e606f93694271dbd66 (diff) | |
parent | e36c54582c6f14adc9e10473e2aec2cc4f0acc03 (diff) |
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
tracing: Fix return of trace_dump_stack()
ksym_tracer: Fix bad cast
tracing/power: Remove two exports
tracing: Change event->profile_count to be int type
tracing: Simplify trace_option_write()
tracing: Remove useless trace option
tracing: Use seq file for trace_clock
tracing: Use seq file for trace_options
function-graph: Allow writing the same val to set_graph_function
ftrace: Call trace_parser_clear() properly
ftrace: Return EINVAL when writing invalid val to set_ftrace_filter
tracing: Move a printk out of ftrace_raw_reg_event_foo()
tracing: Pull up calls to trace_define_common_fields()
tracing: Extract duplicate ftrace_raw_init_event_foo()
ftrace.h: Use common pr_info fmt string
tracing: Add stack trace to irqsoff tracer
tracing: Add trace_dump_stack()
ring-buffer: Move resize integrity check under reader lock
ring-buffer: Use sync sched protection on ring buffer resizing
tracing: Fix wrong usage of strstrip in trace_ksyms
Diffstat (limited to 'kernel/trace/trace_event_profile.c')
-rw-r--r-- | kernel/trace/trace_event_profile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/trace/trace_event_profile.c b/kernel/trace/trace_event_profile.c index d9c60f80aa0d..9e25573242cf 100644 --- a/kernel/trace/trace_event_profile.c +++ b/kernel/trace/trace_event_profile.c | |||
@@ -25,7 +25,7 @@ static int ftrace_profile_enable_event(struct ftrace_event_call *event) | |||
25 | char *buf; | 25 | char *buf; |
26 | int ret = -ENOMEM; | 26 | int ret = -ENOMEM; |
27 | 27 | ||
28 | if (atomic_inc_return(&event->profile_count)) | 28 | if (event->profile_count++ > 0) |
29 | return 0; | 29 | return 0; |
30 | 30 | ||
31 | if (!total_profile_count) { | 31 | if (!total_profile_count) { |
@@ -56,7 +56,7 @@ fail_buf_nmi: | |||
56 | perf_trace_buf = NULL; | 56 | perf_trace_buf = NULL; |
57 | } | 57 | } |
58 | fail_buf: | 58 | fail_buf: |
59 | atomic_dec(&event->profile_count); | 59 | event->profile_count--; |
60 | 60 | ||
61 | return ret; | 61 | return ret; |
62 | } | 62 | } |
@@ -83,7 +83,7 @@ static void ftrace_profile_disable_event(struct ftrace_event_call *event) | |||
83 | { | 83 | { |
84 | char *buf, *nmi_buf; | 84 | char *buf, *nmi_buf; |
85 | 85 | ||
86 | if (!atomic_add_negative(-1, &event->profile_count)) | 86 | if (--event->profile_count > 0) |
87 | return; | 87 | return; |
88 | 88 | ||
89 | event->profile_disable(event); | 89 | event->profile_disable(event); |