diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-09-09 21:34:19 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-09-09 23:54:11 -0400 |
commit | 197e2eabc90c203d1086916b7f66694ba5fbb937 (patch) | |
tree | 80734d0e96ac0f4ffc1bcac4198d537804dae037 /kernel/trace/trace.h | |
parent | a5921c6c37d51ee2079ca3c69ea6f7b7384f5d87 (diff) |
tracing: move PRED macros to trace_events_filter.c
Move DEFINE_COMPARISON_PRED() and DEFINE_EQUALITY_PRED()
to kernel/trace/trace_events_filter.c
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4AA8579B.4020706@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 2163d185fe2..acaa68060eb 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -800,47 +800,6 @@ filter_check_discard(struct ftrace_event_call *call, void *rec, | |||
800 | return 0; | 800 | return 0; |
801 | } | 801 | } |
802 | 802 | ||
803 | #define DEFINE_COMPARISON_PRED(type) \ | ||
804 | static int filter_pred_##type(struct filter_pred *pred, void *event, \ | ||
805 | int val1, int val2) \ | ||
806 | { \ | ||
807 | type *addr = (type *)(event + pred->offset); \ | ||
808 | type val = (type)pred->val; \ | ||
809 | int match = 0; \ | ||
810 | \ | ||
811 | switch (pred->op) { \ | ||
812 | case OP_LT: \ | ||
813 | match = (*addr < val); \ | ||
814 | break; \ | ||
815 | case OP_LE: \ | ||
816 | match = (*addr <= val); \ | ||
817 | break; \ | ||
818 | case OP_GT: \ | ||
819 | match = (*addr > val); \ | ||
820 | break; \ | ||
821 | case OP_GE: \ | ||
822 | match = (*addr >= val); \ | ||
823 | break; \ | ||
824 | default: \ | ||
825 | break; \ | ||
826 | } \ | ||
827 | \ | ||
828 | return match; \ | ||
829 | } | ||
830 | |||
831 | #define DEFINE_EQUALITY_PRED(size) \ | ||
832 | static int filter_pred_##size(struct filter_pred *pred, void *event, \ | ||
833 | int val1, int val2) \ | ||
834 | { \ | ||
835 | u##size *addr = (u##size *)(event + pred->offset); \ | ||
836 | u##size val = (u##size)pred->val; \ | ||
837 | int match; \ | ||
838 | \ | ||
839 | match = (val == *addr) ^ pred->not; \ | ||
840 | \ | ||
841 | return match; \ | ||
842 | } | ||
843 | |||
844 | extern struct mutex event_mutex; | 803 | extern struct mutex event_mutex; |
845 | extern struct list_head ftrace_events; | 804 | extern struct list_head ftrace_events; |
846 | 805 | ||