diff options
author | Frederic Weisbecker <[email protected]> | 2009-09-24 21:10:44 +0200 |
---|---|---|
committer | Frederic Weisbecker <[email protected]> | 2009-09-24 21:39:27 +0200 |
commit | 1889d20922d14a97b2099fa4d47587217c0ba48b (patch) | |
tree | 5980f8473f3482aff577ad262e00d06d0745dcf1 /net/unix/sysctl_net_unix.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 <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Tom Zanussi <[email protected]>
Cc: Li Zefan <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions