summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2009-07-09 16:20:12 +0800
committerIngo Molnar <mingo@elte.hu>2009-07-10 11:55:27 +0200
commitc5cb183608167c744cb28bbd85884be5a4ce875d (patch)
treecce5d915673768ba0f2190920dcd7ee644a5c477 /kernel
parentddc1637af217dbd8bc51f30e6d24e84476a869a6 (diff)
tracing/filter: Remove preds from struct event_subsystem
No need to save preds to event_subsystem, because it's not used. Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Acked-by: Tom Zanussi <tzanussi@gmail.com> Reviewed-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <4A55A83C.1030005@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_events_filter.c39
1 files changed, 6 insertions, 33 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 936c621bbf46..b9aae72d13db 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -420,17 +420,7 @@ EXPORT_SYMBOL_GPL(init_preds);
static void filter_free_subsystem_preds(struct event_subsystem *system)
{
- struct event_filter *filter = system->filter;
struct ftrace_event_call *call;
- int i;
-
- if (filter->n_preds) {
- for (i = 0; i < filter->n_preds; i++)
- filter_free_pred(filter->preds[i]);
- kfree(filter->preds);
- filter->preds = NULL;
- filter->n_preds = 0;
- }
list_for_each_entry(call, &ftrace_events, list) {
if (!call->define_fields)
@@ -607,26 +597,9 @@ static int filter_add_subsystem_pred(struct filter_parse_state *ps,
struct filter_pred *pred,
char *filter_string)
{
- struct event_filter *filter = system->filter;
struct ftrace_event_call *call;
int err = 0;
- if (!filter->preds) {
- filter->preds = kzalloc(MAX_FILTER_PRED * sizeof(pred),
- GFP_KERNEL);
-
- if (!filter->preds)
- return -ENOMEM;
- }
-
- if (filter->n_preds == MAX_FILTER_PRED) {
- parse_error(ps, FILT_ERR_TOO_MANY_PREDS, 0);
- return -ENOSPC;
- }
-
- filter->preds[filter->n_preds] = pred;
- filter->n_preds++;
-
list_for_each_entry(call, &ftrace_events, list) {
if (!call->define_fields)
@@ -1029,12 +1002,12 @@ static int replace_preds(struct event_subsystem *system,
if (elt->op == OP_AND || elt->op == OP_OR) {
pred = create_logical_pred(elt->op);
- if (call) {
+ if (call)
err = filter_add_pred(ps, call, pred);
- filter_free_pred(pred);
- } else
+ else
err = filter_add_subsystem_pred(ps, system,
pred, filter_string);
+ filter_free_pred(pred);
if (err)
return err;
@@ -1048,12 +1021,12 @@ static int replace_preds(struct event_subsystem *system,
}
pred = create_pred(elt->op, operand1, operand2);
- if (call) {
+ if (call)
err = filter_add_pred(ps, call, pred);
- filter_free_pred(pred);
- } else
+ else
err = filter_add_subsystem_pred(ps, system, pred,
filter_string);
+ filter_free_pred(pred);
if (err)
return err;