• Ian Rogers's avatar
    perf parse-events: Name the two term enums · 58d3a4ce
    Ian Rogers authored
    Name the enums used by 'struct parse_events_term' to
    parse_events__term_val_type and parse_events__term_type.
    
    This allows greater compile time error checking.
    
    Fix -Wswitch related issues by explicitly listing all enum values prior
    to default.
    
    Add config_term_name to safely look up a parse_events__term_type name,
    bounds checking the array access first.
    
    Add documentation to 'struct parse_events_terms' and reorder to save
    space.
    Signed-off-by: default avatarIan Rogers <irogers@google.com>
    Tested-by: default avatarKan Liang <kan.liang@linux.intel.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: James Clark <james.clark@arm.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rob Herring <robh@kernel.org>
    Link: https://lore.kernel.org/r/20230831071421.2201358-3-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    58d3a4ce
parse-events.l 12.2 KB