aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evlist.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2022-10-03 13:46:46 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-10-06 08:03:53 -0300
commit182bb594e0678b3ceac99f4ec3daa5d22ea3d0ce (patch)
tree4ae7c492eaae49cb79ce36696357f1027d3e4dc6 /tools/perf/util/evlist.h
parentperf tools: Get rid of evlist__add_on_all_cpus() (diff)
downloadlinux-dev-182bb594e0678b3ceac99f4ec3daa5d22ea3d0ce.tar.xz
linux-dev-182bb594e0678b3ceac99f4ec3daa5d22ea3d0ce.zip
perf tools: Add evlist__add_sched_switch()
Add a help to create a system-wide sched_switch event. One merit is that it sets the system-wide bit before adding it to evlist so that the libperf can handle the cpu and thread maps correctly. Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20221003204647.1481128-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r--tools/perf/util/evlist.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index 9d967fe3953a..16734c6756b3 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -127,6 +127,7 @@ static inline struct evsel *evlist__add_dummy_on_all_cpus(struct evlist *evlist)
{
return evlist__add_aux_dummy(evlist, true);
}
+struct evsel *evlist__add_sched_switch(struct evlist *evlist, bool system_wide);
int evlist__add_sb_event(struct evlist *evlist, struct perf_event_attr *attr,
evsel__sb_cb_t cb, void *data);