aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h44
1 files changed, 29 insertions, 15 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 405cb850b75d..acef8b4636f0 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -483,10 +483,6 @@ static inline int ftrace_graph_addr(unsigned long addr)
483 return 0; 483 return 0;
484} 484}
485#else 485#else
486static inline int ftrace_trace_addr(unsigned long addr)
487{
488 return 1;
489}
490static inline int ftrace_graph_addr(unsigned long addr) 486static inline int ftrace_graph_addr(unsigned long addr)
491{ 487{
492 return 1; 488 return 1;
@@ -500,12 +496,12 @@ print_graph_function(struct trace_iterator *iter)
500} 496}
501#endif /* CONFIG_FUNCTION_GRAPH_TRACER */ 497#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
502 498
503extern struct pid *ftrace_pid_trace; 499extern struct list_head ftrace_pids;
504 500
505#ifdef CONFIG_FUNCTION_TRACER 501#ifdef CONFIG_FUNCTION_TRACER
506static inline int ftrace_trace_task(struct task_struct *task) 502static inline int ftrace_trace_task(struct task_struct *task)
507{ 503{
508 if (!ftrace_pid_trace) 504 if (list_empty(&ftrace_pids))
509 return 1; 505 return 1;
510 506
511 return test_tsk_trace_trace(task); 507 return test_tsk_trace_trace(task);
@@ -699,22 +695,40 @@ struct event_subsystem {
699}; 695};
700 696
701struct filter_pred; 697struct filter_pred;
698struct regex;
702 699
703typedef int (*filter_pred_fn_t) (struct filter_pred *pred, void *event, 700typedef int (*filter_pred_fn_t) (struct filter_pred *pred, void *event,
704 int val1, int val2); 701 int val1, int val2);
705 702
703typedef int (*regex_match_func)(char *str, struct regex *r, int len);
704
705enum regex_type {
706 MATCH_FULL,
707 MATCH_FRONT_ONLY,
708 MATCH_MIDDLE_ONLY,
709 MATCH_END_ONLY,
710};
711
712struct regex {
713 char pattern[MAX_FILTER_STR_VAL];
714 int len;
715 int field_len;
716 regex_match_func match;
717};
718
706struct filter_pred { 719struct filter_pred {
707 filter_pred_fn_t fn; 720 filter_pred_fn_t fn;
708 u64 val; 721 u64 val;
709 char str_val[MAX_FILTER_STR_VAL]; 722 struct regex regex;
710 int str_len; 723 char *field_name;
711 char *field_name; 724 int offset;
712 int offset; 725 int not;
713 int not; 726 int op;
714 int op; 727 int pop_n;
715 int pop_n;
716}; 728};
717 729
730extern enum regex_type
731filter_parse_regex(char *buff, int len, char **search, int *not);
718extern void print_event_filter(struct ftrace_event_call *call, 732extern void print_event_filter(struct ftrace_event_call *call,
719 struct trace_seq *s); 733 struct trace_seq *s);
720extern int apply_event_filter(struct ftrace_event_call *call, 734extern int apply_event_filter(struct ftrace_event_call *call,