diff options
author | Tom Zanussi <tzanussi@gmail.com> | 2009-04-08 04:15:54 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-13 18:00:56 -0400 |
commit | eb02ce017dd83985041a7e54c6449f92d53b026f (patch) | |
tree | 7f52a3e92bf3dae1f3c7754a58ab76fb2eceb2e1 /kernel/trace/kmemtrace.c | |
parent | 5f77a88b3f8268b11940b51d2e03d26a663ceb90 (diff) |
tracing/filters: use ring_buffer_discard_commit() in filter_check_discard()
This patch changes filter_check_discard() to make use of the new
ring_buffer_discard_commit() function and modifies the current users to
call the old commit function in the non-discard case.
It also introduces a version of filter_check_discard() that uses the
global trace buffer (filter_current_check_discard()) for those cases.
v2 changes:
- fix compile error noticed by Ingo Molnar
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: fweisbec@gmail.com
LKML-Reference: <1239178554.10295.36.camel@tropicana>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/kmemtrace.c')
-rw-r--r-- | kernel/trace/kmemtrace.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c index 9419ad10541b..86cdf671d7e2 100644 --- a/kernel/trace/kmemtrace.c +++ b/kernel/trace/kmemtrace.c | |||
@@ -63,9 +63,8 @@ static inline void kmemtrace_alloc(enum kmemtrace_type_id type_id, | |||
63 | entry->gfp_flags = gfp_flags; | 63 | entry->gfp_flags = gfp_flags; |
64 | entry->node = node; | 64 | entry->node = node; |
65 | 65 | ||
66 | filter_check_discard(call, entry, event); | 66 | if (!filter_check_discard(call, entry, tr->buffer, event)) |
67 | 67 | ring_buffer_unlock_commit(tr->buffer, event); | |
68 | ring_buffer_unlock_commit(tr->buffer, event); | ||
69 | 68 | ||
70 | trace_wake_up(); | 69 | trace_wake_up(); |
71 | } | 70 | } |
@@ -90,9 +89,8 @@ static inline void kmemtrace_free(enum kmemtrace_type_id type_id, | |||
90 | entry->call_site = call_site; | 89 | entry->call_site = call_site; |
91 | entry->ptr = ptr; | 90 | entry->ptr = ptr; |
92 | 91 | ||
93 | filter_check_discard(call, entry, event); | 92 | if (!filter_check_discard(call, entry, tr->buffer, event)) |
94 | 93 | ring_buffer_unlock_commit(tr->buffer, event); | |
95 | ring_buffer_unlock_commit(tr->buffer, event); | ||
96 | 94 | ||
97 | trace_wake_up(); | 95 | trace_wake_up(); |
98 | } | 96 | } |