Commit 4451dae4 authored by Howard Chu's avatar Howard Chu Committed by Arnaldo Carvalho de Melo

perf evlist: Introduce method to find if there is a bpf-output event

We'll use it in the next patch, to deciding how to set up the ring
buffer.
Signed-off-by: default avatarHoward Chu <howardchu95@gmail.com>
Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240815013626.935097-2-howardchu95@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 8b48f8ba
......@@ -2627,3 +2627,15 @@ void evlist__uniquify_name(struct evlist *evlist)
}
}
}
bool evlist__has_bpf_output(struct evlist *evlist)
{
struct evsel *evsel;
evlist__for_each_entry(evlist, evsel) {
if (evsel__is_bpf_output(evsel))
return true;
}
return false;
}
......@@ -447,5 +447,6 @@ int evlist__scnprintf_evsels(struct evlist *evlist, size_t size, char *bf);
void evlist__check_mem_load_aux(struct evlist *evlist);
void evlist__warn_user_requested_cpus(struct evlist *evlist, const char *cpu_list);
void evlist__uniquify_name(struct evlist *evlist);
bool evlist__has_bpf_output(struct evlist *evlist);
#endif /* __PERF_EVLIST_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment