Re: [RFCv2 0/7] libperf: Add leader/group info to perf_evsel
From: Arnaldo Carvalho de Melo
Date: Wed Jul 07 2021 - 10:47:30 EST
Em Tue, Jul 06, 2021 at 05:16:57PM +0200, Jiri Olsa escreveu:
> hi,
> moving leader/group info to libperf's perf_evsel.
>
> This was asked for by Shunsuke [1] and is on my list
> as a prereq for event parsing move to libperf.
So I'll add a:
Requested-by: Shunsuke Nakamura <nakamura.shun@xxxxxxxxxxx>
- Arnaldo
> I still need to do more tests, but I'd like to check
> with you guys if there's any feedback on this first.
>
> Also available in:
> git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
> libperf/groups
>
> v2 change:
> - repost due to smtp failures, no changes
>
> thanks,
> jirka
>
>
> [1] https://lore.kernel.org/linux-perf-users/OSBPR01MB46005B38568E90509946ECA9F7319@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
>
>
> ---
> Jiri Olsa (7):
> libperf: Change tests to single static and shared binaries
> libperf: Move idx to perf_evsel::idx
> libperf: Move leader to perf_evsel::leader
> libperf: Move nr_groups to evlist::nr_groups
> libperf: Add perf_evlist__set_leader function
> libperF: Add group support to perf_evsel__open
> libperf: Add tests for perf_evlist__set_leader function
>
> tools/lib/perf/Build | 2 ++
> tools/lib/perf/Makefile | 30 +++++++++++++++++++++++++-----
> tools/lib/perf/evlist.c | 22 ++++++++++++++++++++++
> tools/lib/perf/evsel.c | 33 +++++++++++++++++++++++++++++----
> tools/lib/perf/include/internal/evlist.h | 2 ++
> tools/lib/perf/include/internal/evsel.h | 5 ++++-
> tools/lib/perf/include/internal/tests.h | 4 ++--
> tools/lib/perf/include/perf/evlist.h | 1 +
> tools/lib/perf/libperf.map | 1 +
> tools/lib/perf/tests/Build | 5 +++++
> tools/lib/perf/tests/Makefile | 40 ----------------------------------------
> tools/lib/perf/tests/main.c | 15 +++++++++++++++
> tools/lib/perf/tests/test-cpumap.c | 3 ++-
> tools/lib/perf/tests/test-evlist.c | 30 +++++++++++++++++++++++-------
> tools/lib/perf/tests/test-evsel.c | 3 ++-
> tools/lib/perf/tests/test-threadmap.c | 3 ++-
> tools/lib/perf/tests/tests.h | 10 ++++++++++
> tools/perf/arch/x86/util/iostat.c | 4 ++--
> tools/perf/builtin-diff.c | 4 ++--
> tools/perf/builtin-record.c | 4 ++--
> tools/perf/builtin-report.c | 8 ++++----
> tools/perf/builtin-script.c | 9 +++++----
> tools/perf/builtin-stat.c | 12 ++++++------
> tools/perf/builtin-top.c | 10 +++++-----
> tools/perf/tests/bpf.c | 2 +-
> tools/perf/tests/evsel-roundtrip-name.c | 6 +++---
> tools/perf/tests/mmap-basic.c | 8 ++++----
> tools/perf/tests/parse-events.c | 74 +++++++++++++++++++++++++++++++++++++-------------------------------------
> tools/perf/tests/pfm.c | 4 ++--
> tools/perf/ui/browsers/annotate.c | 2 +-
> tools/perf/util/annotate.c | 8 ++++----
> tools/perf/util/auxtrace.c | 12 ++++++------
> tools/perf/util/cgroup.c | 2 +-
> tools/perf/util/evlist.c | 44 +++++++++++++-------------------------------
> tools/perf/util/evlist.h | 2 --
> tools/perf/util/evsel.c | 32 +++++++++++++++++++++++++-------
> tools/perf/util/evsel.h | 14 ++++++++------
> tools/perf/util/header.c | 18 +++++++++---------
> tools/perf/util/metricgroup.c | 22 +++++++++++-----------
> tools/perf/util/parse-events.c | 8 ++++----
> tools/perf/util/pfm.c | 2 +-
> tools/perf/util/python.c | 2 +-
> tools/perf/util/record.c | 6 +++---
> tools/perf/util/stat-shadow.c | 2 +-
> tools/perf/util/stat.c | 2 +-
> tools/perf/util/stream.c | 2 +-
> 46 files changed, 310 insertions(+), 224 deletions(-)
> create mode 100644 tools/lib/perf/tests/Build
> delete mode 100644 tools/lib/perf/tests/Makefile
> create mode 100644 tools/lib/perf/tests/main.c
> create mode 100644 tools/lib/perf/tests/tests.h
>
--
- Arnaldo