aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-01-27 22:42:43 -0500
committerSteven Rostedt <rostedt@goodmis.org>2011-02-07 20:56:18 -0500
commitc9c53ca03d6f97fdd9832d5ed3f15b30ee5cdb86 (patch)
tree108e2ccd275a9a3d6ddbc7a91c9aabcf883dd5ec /kernel/trace/trace.h
parent58d9a597c4275d830a819625e7d437cd6fb23fa5 (diff)
tracing/filter: Dynamically allocate preds
For every filter that is made, we create predicates to hold every operation within the filter. We have a max of 32 predicates that we can hold. Currently, we allocate all 32 even if we only need to use one. Part of the reason we do this is that the filter can be used at any moment by any event. Fortunately, the filter is only used with preemption disabled. By reseting the count of preds used "n_preds" to zero, then performing a synchronize_sched(), we can safely free and reallocate a new array of preds. Cc: Tom Zanussi <tzanussi@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 1597bc0749c1..441fc1bc85d6 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -661,7 +661,8 @@ struct ftrace_event_field {
661}; 661};
662 662
663struct event_filter { 663struct event_filter {
664 int n_preds; 664 int n_preds; /* Number assigned */
665 int a_preds; /* allocated */
665 struct filter_pred **preds; 666 struct filter_pred **preds;
666 char *filter_string; 667 char *filter_string;
667}; 668};