• Tejun Heo's avatar
    tracing: Factorize filter creation · 38b78eb8
    Tejun Heo authored
    There are four places where new filter for a given filter string is
    created, which involves several different steps.  This patch factors
    those steps into create_[system_]filter() functions which in turn make
    use of create_filter_{start|finish}() for common parts.
    
    The only functional change is that if replace_filter_string() is
    requested and fails, creation fails without any side effect instead of
    being ignored.
    
    Note that system filter is now installed after the processing is
    complete which makes freeing before and then restoring filter string
    on error unncessary.
    
    -v2: Rebased to resolve conflict with 49aa2951 and updated both
         create_filter() functions to always set *filterp instead of
         requiring the caller to clear it to %NULL on entry.
    
    Link: http://lkml.kernel.org/r/1323988305-1469-2-git-send-email-tj@kernel.orgSigned-off-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    38b78eb8
trace_events_filter.c 47.5 KB