• Steven Rostedt (VMware)'s avatar
    tracing: Clean up and document pred_funcs_##type creation and use · 478325f1
    Steven Rostedt (VMware) authored
    The pred_funcs_##type arrays consist of five functions that are assigned
    based on the ops. The array must be in the same order of the ops each
    function represents. The PRED_FUNC_START macro denotes the op enum that
    starts the op that maps to the pred_funcs_##type arrays. This is all very
    subtle and prone to bugs if the code is changed.
    
    Add comments describing how PRED_FUNC_START and pred_funcs_##type array is
    used, and also a PRED_FUNC_MAX that is the maximum number of functions in
    the arrays.
    
    Clean up select_comparison_fn() that assigns the predicates to the
    pred_funcs_##type array function as well as add protection in case an op is
    passed in that does not map correctly to the array.
    Reviewed-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
    Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
    478325f1
trace_events_filter.c 54.5 KB