• Dmitry Safonov's avatar
    ftrace: add module globbing · 0b507e1e
    Dmitry Safonov authored
    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.comSigned-off-by: default avatarDmitry Safonov <0x7f454c46@gmail.com>
    [ Made format changes ]
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    0b507e1e
ftrace.c 138 KB