perf evlist: Add a method to return the list of evsels as a string
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 14 Apr 2021 13:08:16 +0000 (10:08 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 15 Apr 2021 19:33:57 +0000 (16:33 -0300)
commit9865ea8ab31f2e56be59125099ee251ce573f293
treea1d8ff2020f73b077815e136a180c889f720e5c6
parent5676dba708bbb1fc94a9d3b2e9c114db9e4c6699
perf evlist: Add a method to return the list of evsels as a string

Add a 'scnprintf' method to obtain the list of evsels in a evlist as a
string, excluding the "dummy" event used for things like receiving
metadata events (PERF_RECORD_FORK, MMAP, etc) when synthesizing
preexisting threads.

Will be used to improve the error message for workload failure in 'perf
record.

Acked-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/lkml/20210414131628.2064862-2-acme@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evlist.c
tools/perf/util/evlist.h