diff options
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 14 |
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); | |||
866 | extern void filter_free_subsystem_preds(struct event_subsystem *system); | 866 | extern void filter_free_subsystem_preds(struct event_subsystem *system); |
867 | extern int filter_add_subsystem_pred(struct event_subsystem *system, | 867 | extern int filter_add_subsystem_pred(struct event_subsystem *system, |
868 | struct filter_pred *pred); | 868 | struct filter_pred *pred); |
869 | extern int filter_current_check_discard(struct ftrace_event_call *call, | ||
870 | void *rec, | ||
871 | struct ring_buffer_event *event); | ||
869 | 872 | ||
870 | static inline void | 873 | static inline int |
871 | filter_check_discard(struct ftrace_event_call *call, void *rec, | 874 | filter_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) \ |