ftrace: add module command function filter selection
authorSteven Rostedt <srostedt@redhat.com>
Fri, 13 Feb 2009 22:08:48 +0000 (17:08 -0500)
committerSteven Rostedt <srostedt@redhat.com>
Mon, 16 Feb 2009 21:55:50 +0000 (16:55 -0500)
commit64e7c440618998fd69eee6ab490b042d12248021
tree384246f895f2697dd6927b776c67755cc13e901d
parent9f4801e30ad291e27284e873696da1ead92d68fa
ftrace: add module command function filter selection

This patch adds a "command" syntax to the function filtering files:

  /debugfs/tracing/set_ftrace_filter
  /debugfs/tracing/set_ftrace_notrace

Of the format:  <function>:<command>:<parameter>

The command is optional, and dependent on the command, so are
the parameters.

 echo do_fork > set_ftrace_filter

Will only trace 'do_fork'.

 echo 'sched_*' > set_ftrace_filter

Will only trace functions starting with the letters 'sched_'.

 echo '*:mod:ext3' > set_ftrace_filter

Will trace only the ext3 module functions.

 echo '*write*:mod:ext3' > set_ftrace_notrace

Will prevent the ext3 functions with the letters 'write' in
the name from being traced.

 echo '!*_allocate:mod:ext3' > set_ftrace_filter

Will remove the functions in ext3 that end with the letters
'_allocate' from the ftrace filter.

Although this patch implements the 'command' format, only the
'mod' command is supported. More commands to follow.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
kernel/trace/ftrace.c