diff options
author | Jiri Olsa <jolsa@kernel.org> | 2018-07-20 14:00:33 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-07-24 20:54:13 +0300 |
commit | 2d6cae13f10d5d8b370038dbfdf60317c22b9f52 (patch) | |
tree | e1fef86d8cbe76b312216406fb4dd1630b466924 /tools/perf | |
parent | 46b3722cc7765582354488da633aafffcb138458 (diff) | |
download | linux-2d6cae13f10d5d8b370038dbfdf60317c22b9f52.tar.xz |
perf tools: Use perf_evsel__match instead of open coded equivalent
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>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/evsel.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index d277930b19a1..890babf9ce86 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -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 { |