]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/filter: Dynamically allocate preds
authorSteven Rostedt <srostedt@redhat.com>
Fri, 28 Jan 2011 03:42:43 +0000 (22:42 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 8 Feb 2011 01:56:18 +0000 (20:56 -0500)
commit4e28cbb1edf977c7f85b6c7a91f9aabf5df3f58f
tree108e2ccd275a9a3d6ddbc7a91c9aabcf883dd5ec
parentc74d93c84e1ff97b06781c33732ac44bd175bbfd
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>
kernel/trace/trace.h
kernel/trace/trace_events_filter.c