Merge branches 'work.misc' and 'work.dcache' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / tools / perf / util / evsel.h
index d277930b19a1168ac6f0e76009d92592d2283d80..973c03167947579ff424d8e181cdbf42eaedec2d 100644 (file)
@@ -402,10 +402,13 @@ 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 perf_evsel__match(evsel, SOFTWARE, SW_BPF_OUTPUT);
+}
 
-       return (attr->config == PERF_COUNT_SW_BPF_OUTPUT) &&
-               (attr->type == PERF_TYPE_SOFTWARE);
+static inline bool perf_evsel__is_clock(struct perf_evsel *evsel)
+{
+       return perf_evsel__match(evsel, SOFTWARE, SW_CPU_CLOCK) ||
+              perf_evsel__match(evsel, SOFTWARE, SW_TASK_CLOCK);
 }
 
 struct perf_attr_details {