diff options
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 34b94c3f40ad..e7737281953f 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -866,6 +866,21 @@ extern void filter_free_subsystem_preds(struct event_subsystem *system); | |||
866 | extern int filter_add_subsystem_pred(struct event_subsystem *system, | 866 | extern int filter_add_subsystem_pred(struct event_subsystem *system, |
867 | struct filter_pred *pred); | 867 | struct filter_pred *pred); |
868 | 868 | ||
869 | static inline void | ||
870 | filter_check_discard(struct ftrace_event_call *call, void *rec, | ||
871 | struct ring_buffer_event *event) | ||
872 | { | ||
873 | if (unlikely(call->preds) && !filter_match_preds(call, rec)) | ||
874 | ring_buffer_event_discard(event); | ||
875 | } | ||
876 | |||
877 | #define __common_field(type, item) \ | ||
878 | ret = trace_define_field(event_call, #type, "common_" #item, \ | ||
879 | offsetof(typeof(field.ent), item), \ | ||
880 | sizeof(field.ent.item)); \ | ||
881 | if (ret) \ | ||
882 | return ret; | ||
883 | |||
869 | void event_trace_printk(unsigned long ip, const char *fmt, ...); | 884 | void event_trace_printk(unsigned long ip, const char *fmt, ...); |
870 | extern struct ftrace_event_call __start_ftrace_events[]; | 885 | extern struct ftrace_event_call __start_ftrace_events[]; |
871 | extern struct ftrace_event_call __stop_ftrace_events[]; | 886 | extern struct ftrace_event_call __stop_ftrace_events[]; |
@@ -897,4 +912,9 @@ do { \ | |||
897 | __trace_printk(ip, fmt, ##args); \ | 912 | __trace_printk(ip, fmt, ##args); \ |
898 | } while (0) | 913 | } while (0) |
899 | 914 | ||
915 | #undef TRACE_EVENT_FORMAT | ||
916 | #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \ | ||
917 | extern struct ftrace_event_call event_##call; | ||
918 | #include "trace_event_types.h" | ||
919 | |||
900 | #endif /* _LINUX_KERNEL_TRACE_H */ | 920 | #endif /* _LINUX_KERNEL_TRACE_H */ |