lkml.org 
[lkml]   [2018]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/4] perf tools: Use perf_evsel__match in perf_evsel__is_bpf_output
Date
Using perf_evsel__match helper in perf_evsel__is_bpf_output.

Link: http://lkml.kernel.org/n/tip-lquycuebqfcb56byv1qdjaix@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/util/evsel.h | 5 +----
1 file changed, 1 insertion(+), 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 {
--
2.17.1
\
 
 \ /
  Last update: 2018-07-20 13:01    [W:0.083 / U:8.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site