]> git.karo-electronics.de Git - linux-beck.git/commit
ftrace: add module globbing
authorDmitry Safonov <0x7f454c46@gmail.com>
Tue, 29 Sep 2015 16:46:15 +0000 (19:46 +0300)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 21 Oct 2015 00:02:03 +0000 (20:02 -0400)
commit0b507e1ed1b7364def464cfb348ea7c9e87e6e18
tree0cad422579c4050ce223256fb45aafe30032d723
parent3ba009297149fa45956c33ab5de7c5f4da1f28b8
ftrace: add module globbing

Extend module command for function filter selection with globbing.
It uses the same globbing as function filter.

  sh# echo '*alloc*:mod:*' > set_ftrace_filter

Will trace any function with the letters 'alloc' in the name in any
module but not in kernel.

  sh# echo '!*alloc*:mod:ipv6' >> set_ftrace_filter

Will prevent from tracing functions with 'alloc' in the name from module
ipv6 (do not forget to append to set_ftrace_filter file).

  sh# echo '*alloc*:mod:!ipv6' > set_ftrace_filter

Will trace functions with 'alloc' in the name from kernel and any
module except ipv6.

  sh# echo '*alloc*:mod:!*' > set_ftrace_filter

Will trace any function with the letters 'alloc' in the name only from
kernel, but not from any module.

  sh# echo '*:mod:!*' > set_ftrace_filter
or
  sh# echo ':mod:!' > set_ftrace_filter

Will trace every function in the kernel, but will not trace functions
from any module.

  sh# echo '*:mod:*' > set_ftrace_filter
or
  sh# echo ':mod:' > set_ftrace_filter

As the opposite will trace all functions from all modules, but not from
kernel.

  sh# echo '*:mod:*snd*' > set_ftrace_filter

Will trace your sound drivers only (if any).

Link: http://lkml.kernel.org/r/1443545176-3215-4-git-send-email-0x7f454c46@gmail.com
Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
[ Made format changes ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ftrace.c