提交 c09d7a3d 编写于 作者: F Frederic Weisbecker

Merge branch '/tip/perf/filter' of...

Merge branch '/tip/perf/filter' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git into perf/core
......@@ -208,7 +208,6 @@ struct ftrace_event_call {
#define PERF_MAX_TRACE_SIZE 2048
#define MAX_FILTER_PRED 32
#define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */
extern void destroy_preds(struct ftrace_event_call *call);
......
......@@ -661,8 +661,10 @@ struct ftrace_event_field {
};
struct event_filter {
int n_preds;
struct filter_pred **preds;
int n_preds; /* Number assigned */
int a_preds; /* allocated */
struct filter_pred *preds;
struct filter_pred *root;
char *filter_string;
};
......@@ -674,11 +676,23 @@ struct event_subsystem {
int nr_events;
};
#define FILTER_PRED_INVALID ((unsigned short)-1)
#define FILTER_PRED_IS_RIGHT (1 << 15)
#define FILTER_PRED_FOLD (1 << 15)
/*
* The max preds is the size of unsigned short with
* two flags at the MSBs. One bit is used for both the IS_RIGHT
* and FOLD flags. The other is reserved.
*
* 2^14 preds is way more than enough.
*/
#define MAX_FILTER_PRED 16384
struct filter_pred;
struct regex;
typedef int (*filter_pred_fn_t) (struct filter_pred *pred, void *event,
int val1, int val2);
typedef int (*filter_pred_fn_t) (struct filter_pred *pred, void *event);
typedef int (*regex_match_func)(char *str, struct regex *r, int len);
......@@ -700,11 +714,23 @@ struct filter_pred {
filter_pred_fn_t fn;
u64 val;
struct regex regex;
/*
* Leaf nodes use field_name, ops is used by AND and OR
* nodes. The field_name is always freed when freeing a pred.
* We can overload field_name for ops and have it freed
* as well.
*/
union {
char *field_name;
unsigned short *ops;
};
int offset;
int not;
int op;
int pop_n;
unsigned short index;
unsigned short parent;
unsigned short left;
unsigned short right;
};
extern struct list_head ftrace_common_fields;
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册