aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorTom Zanussi <tzanussi@gmail.com>2009-04-08 04:15:54 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-13 18:00:56 -0400
commiteb02ce017dd83985041a7e54c6449f92d53b026f (patch)
tree7f52a3e92bf3dae1f3c7754a58ab76fb2eceb2e1 /kernel/trace/trace.h
parent5f77a88b3f8268b11940b51d2e03d26a663ceb90 (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/trace.h')
-rw-r--r--kernel/trace/trace.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index dfefffd7ae39..9729d14767d8 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -866,13 +866,21 @@ extern int filter_match_preds(struct ftrace_event_call *call, void *rec);
866extern void filter_free_subsystem_preds(struct event_subsystem *system); 866extern void filter_free_subsystem_preds(struct event_subsystem *system);
867extern int filter_add_subsystem_pred(struct event_subsystem *system, 867extern int filter_add_subsystem_pred(struct event_subsystem *system,
868 struct filter_pred *pred); 868 struct filter_pred *pred);
869extern int filter_current_check_discard(struct ftrace_event_call *call,
870 void *rec,
871 struct ring_buffer_event *event);
869 872
870static inline void 873static inline int
871filter_check_discard(struct ftrace_event_call *call, void *rec, 874filter_check_discard(struct ftrace_event_call *call, void *rec,
875 struct ring_buffer *buffer,
872 struct ring_buffer_event *event) 876 struct ring_buffer_event *event)
873{ 877{
874 if (unlikely(call->preds) && !filter_match_preds(call, rec)) 878 if (unlikely(call->preds) && !filter_match_preds(call, rec)) {
875 ring_buffer_event_discard(event); 879 ring_buffer_discard_commit(buffer, event);
880 return 1;
881 }
882
883 return 0;
876} 884}
877 885
878#define __common_field(type, item) \ 886#define __common_field(type, item) \