• Li Zefan's avatar
    tracing/filters: improve subsystem filter · 1f9963cb
    Li Zefan authored
    Currently a subsystem filter should be applicable to all events
    under the subsystem, and if it failed, all the event filters
    will be cleared. Those behaviors make subsys filter much less
      # echo 'vec == 1' > irq/softirq_entry/filter
      # echo 'irq == 5' > irq/filter
      bash: echo: write error: Invalid argument
      # cat irq/softirq_entry/filter
    I'd expect it set the filter for irq_handler_entry/exit, and
    not touch softirq_entry/exit.
    The basic idea is, try to see if the filter can be applied
    to which events, and then just apply to the those events:
      # echo 'vec == 1' > softirq_entry/filter
      # echo 'irq == 5' > filter
      # cat irq_handler_entry/filter
      irq == 5
      # cat softirq_entry/filter
      vec == 1
    Changelog for v2:
    - do some cleanups to address Frederic's comments.
    Inspired-by: default avatarSteven Rostedt <srostedt@redhat.com>
    Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
    Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    LKML-Reference: <4A63D485.7030703@cn.fujitsu.com>
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
ftrace_event.h 4.78 KB