diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-09-24 21:10:44 +0200 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-09-24 21:39:27 +0200 |
commit | 1889d20922d14a97b2099fa4d47587217c0ba48b (patch) | |
tree | 5980f8473f3482aff577ad262e00d06d0745dcf1 /kernel/cgroup.c | |
parent | f3f3f0092477d0165f3f1bf0fd518550b2abd097 (diff) |
tracing/filters: Provide basic regex support
This patch provides basic support for regular expressions in filters.
It supports the following types of regexp:
- *match_beginning
- *match_middle*
- match_end*
- !don't match
Example:
cd /debug/tracing/events/bkl/lock_kernel
echo 'file == "*reiserfs*"' > filter
echo 1 > enable
gedit-4941 [000] 457.735437: lock_kernel: depth: 0, fs/reiserfs/namei.c:334 reiserfs_lookup()
sync_supers-227 [001] 461.379985: lock_kernel: depth: 0, fs/reiserfs/super.c:69 reiserfs_sync_fs()
sync_supers-227 [000] 461.383096: lock_kernel: depth: 0, fs/reiserfs/journal.c:1069 flush_commit_list()
reiserfs/1-1369 [001] 461.479885: lock_kernel: depth: 0, fs/reiserfs/journal.c:3509 flush_async_commits()
Every string is now handled as a regexp in the filter framework, which
helps to factorize the code for handling both simple strings and
regexp comparisons.
(The regexp parsing code has been wildly cherry picked from ftrace.c
written by Steve.)
v2: Simplify the whole and drop the filter_regex file
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Diffstat (limited to 'kernel/cgroup.c')
0 files changed, 0 insertions, 0 deletions