diff options
Diffstat (limited to 'kernel/trace/trace.h')
| -rw-r--r-- | kernel/trace/trace.h | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 405cb850b75d..365fb19d9e11 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
| @@ -699,22 +699,40 @@ struct event_subsystem { | |||
| 699 | }; | 699 | }; |
| 700 | 700 | ||
| 701 | struct filter_pred; | 701 | struct filter_pred; |
| 702 | struct regex; | ||
| 702 | 703 | ||
| 703 | typedef int (*filter_pred_fn_t) (struct filter_pred *pred, void *event, | 704 | typedef int (*filter_pred_fn_t) (struct filter_pred *pred, void *event, |
| 704 | int val1, int val2); | 705 | int val1, int val2); |
| 705 | 706 | ||
| 707 | typedef int (*regex_match_func)(char *str, struct regex *r, int len); | ||
| 708 | |||
| 709 | enum regex_type { | ||
| 710 | MATCH_FULL, | ||
| 711 | MATCH_FRONT_ONLY, | ||
| 712 | MATCH_MIDDLE_ONLY, | ||
| 713 | MATCH_END_ONLY, | ||
| 714 | }; | ||
| 715 | |||
| 716 | struct regex { | ||
| 717 | char pattern[MAX_FILTER_STR_VAL]; | ||
| 718 | int len; | ||
| 719 | int field_len; | ||
| 720 | regex_match_func match; | ||
| 721 | }; | ||
| 722 | |||
| 706 | struct filter_pred { | 723 | struct filter_pred { |
| 707 | filter_pred_fn_t fn; | 724 | filter_pred_fn_t fn; |
| 708 | u64 val; | 725 | u64 val; |
| 709 | char str_val[MAX_FILTER_STR_VAL]; | 726 | struct regex regex; |
| 710 | int str_len; | 727 | char *field_name; |
| 711 | char *field_name; | 728 | int offset; |
| 712 | int offset; | 729 | int not; |
| 713 | int not; | 730 | int op; |
| 714 | int op; | 731 | int pop_n; |
| 715 | int pop_n; | ||
| 716 | }; | 732 | }; |
| 717 | 733 | ||
| 734 | extern enum regex_type | ||
| 735 | filter_parse_regex(char *buff, int len, char **search, int *not); | ||
| 718 | extern void print_event_filter(struct ftrace_event_call *call, | 736 | extern void print_event_filter(struct ftrace_event_call *call, |
| 719 | struct trace_seq *s); | 737 | struct trace_seq *s); |
| 720 | extern int apply_event_filter(struct ftrace_event_call *call, | 738 | extern int apply_event_filter(struct ftrace_event_call *call, |
