Skip to content

Commit

Permalink
perf tools: Use perf_evsel__match instead of open coded equivalent
Browse files Browse the repository at this point in the history
Use perf_evsel__match() helper in perf_evsel__is_bpf_output().

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180720110036.32251-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Jul 24, 2018
1 parent 46b3722 commit 2d6cae1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tools/perf/util/evsel.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,7 @@ bool perf_evsel__is_function_event(struct perf_evsel *evsel);

static inline bool perf_evsel__is_bpf_output(struct perf_evsel *evsel)
{
struct perf_event_attr *attr = &evsel->attr;

return (attr->config == PERF_COUNT_SW_BPF_OUTPUT) &&
(attr->type == PERF_TYPE_SOFTWARE);
return perf_evsel__match(evsel, SOFTWARE, SW_BPF_OUTPUT);
}

struct perf_attr_details {
Expand Down

0 comments on commit 2d6cae1

Please sign in to comment.