From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@linux.intel.com>, Ian Rogers <irogers@google.com>,
Stephane Eranian <eranian@google.com>,
Song Liu <songliubraving@fb.com>
Subject: Re: [PATCH 4/4] perf stat: Enable BPF counter with --for-each-cgroup
Date: Wed, 30 Jun 2021 15:50:12 -0300 [thread overview]
Message-ID: <YNy85M22XZ8Sc/Gz@kernel.org> (raw)
In-Reply-To: <20210625071826.608504-5-namhyung@kernel.org>
Em Fri, Jun 25, 2021 at 12:18:26AM -0700, Namhyung Kim escreveu:
> Recently bperf was added to use BPF to count perf events for various
> purposes. This is an extension for the approach and targetting to
> cgroup usages.
>
> Unlike the other bperf, it doesn't share the events with other
> processes but it'd reduce unnecessary events (and the overhead of
> multiplexing) for each monitored cgroup within the perf session.
>
> When --for-each-cgroup is used with --bpf-counters, it will open
> cgroup-switches event per cpu internally and attach the new BPF
> program to read given perf_events and to aggregate the results for
> cgroups. It's only called when task is switched to a task in a
> different cgroup.
I'll take a stab at fixing these:
⬢[acme@toolbox perf]$ make -k CORESIGHT=1 BUILD_BPF_SKEL=1 PYTHON=python3 DEBUG=1 O=/tmp/build/perf -C tools/perf install-bin
make: Entering directory '/var/home/acme/git/perf/tools/perf'
BUILD: Doing 'make -j24' parallel build
Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
Warning: Kernel ABI header at 'tools/include/uapi/linux/mount.h' differs from latest version at 'include/uapi/linux/mount.h'
diff -u tools/include/uapi/linux/mount.h include/uapi/linux/mount.h
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h'
diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/svm.h' differs from latest version at 'arch/x86/include/uapi/asm/svm.h'
diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h
Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
DESCEND plugins
GEN /tmp/build/perf/python/perf.so
INSTALL trace_plugins
CC /tmp/build/perf/util/bpf_counter_cgroup.o
CC /tmp/build/perf/util/demangle-java.o
CC /tmp/build/perf/util/demangle-rust.o
CC /tmp/build/perf/util/jitdump.o
CC /tmp/build/perf/util/genelf.o
CC /tmp/build/perf/util/genelf_debug.o
CC /tmp/build/perf/util/perf-hooks.o
CC /tmp/build/perf/util/bpf-event.o
util/bpf_counter_cgroup.c: In function ‘bperf_load_program’:
util/bpf_counter_cgroup.c:96:23: error: comparison of integer expressions of different signedness: ‘__u32’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
96 | for (i = 0; i < nr_cpus; i++) {
| ^
util/bpf_counter_cgroup.c:125:43: error: comparison of integer expressions of different signedness: ‘__u32’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare]
125 | for (cpu = 0; cpu < nr_cpus; cpu++) {
| ^
util/bpf_counter_cgroup.c: In function ‘bperf_cgrp__load’:
util/bpf_counter_cgroup.c:178:65: error: unused parameter ‘target’ [-Werror=unused-parameter]
178 | static int bperf_cgrp__load(struct evsel *evsel, struct target *target)
| ~~~~~~~~~~~~~~~^~~~~~
util/bpf_counter_cgroup.c: In function ‘bperf_cgrp__install_pe’:
util/bpf_counter_cgroup.c:195:49: error: unused parameter ‘evsel’ [-Werror=unused-parameter]
195 | static int bperf_cgrp__install_pe(struct evsel *evsel, int cpu, int fd)
| ~~~~~~~~~~~~~~^~~~~
util/bpf_counter_cgroup.c:195:60: error: unused parameter ‘cpu’ [-Werror=unused-parameter]
195 | static int bperf_cgrp__install_pe(struct evsel *evsel, int cpu, int fd)
| ~~~~^~~
util/bpf_counter_cgroup.c:195:69: error: unused parameter ‘fd’ [-Werror=unused-parameter]
195 | static int bperf_cgrp__install_pe(struct evsel *evsel, int cpu, int fd)
| ~~~~^~
util/bpf_counter_cgroup.c: In function ‘bperf_cgrp__enable’:
util/bpf_counter_cgroup.c:219:45: error: unused parameter ‘evsel’ [-Werror=unused-parameter]
219 | static int bperf_cgrp__enable(struct evsel *evsel)
| ~~~~~~~~~~~~~~^~~~~
cc1: all warnings being treated as errors
make[4]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:96: /tmp/build/perf/util/bpf_counter_cgroup.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
make[2]: *** [Makefile.perf:655: /tmp/build/perf/perf-in.o] Error 2
make[1]: *** [Makefile.perf:238: sub-make] Error 2
make: *** [Makefile:113: install-bin] Error 2
make: Leaving directory '/var/home/acme/git/perf/tools/perf'
⬢[acme@toolbox perf]$
next prev parent reply other threads:[~2021-06-30 18:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-25 7:18 [PATCHSET v4 0/4] perf stat: Enable BPF counters with --for-each-cgroup Namhyung Kim
2021-06-25 7:18 ` [PATCH 1/4] perf tools: Add read_cgroup_id() function Namhyung Kim
2021-07-01 17:59 ` Arnaldo Carvalho de Melo
2021-06-25 7:18 ` [PATCH 2/4] perf tools: Add cgroup_is_v2() helper Namhyung Kim
2021-06-29 15:51 ` Ian Rogers
2021-06-30 6:35 ` Namhyung Kim
2021-06-30 18:43 ` Arnaldo Carvalho de Melo
2021-06-25 7:18 ` [PATCH 3/4] perf tools: Move common bpf functions to bpf_counter.h Namhyung Kim
2021-06-30 18:28 ` Song Liu
2021-07-01 19:09 ` Arnaldo Carvalho de Melo
2021-07-01 20:11 ` Namhyung Kim
2021-06-25 7:18 ` [PATCH 4/4] perf stat: Enable BPF counter with --for-each-cgroup Namhyung Kim
2021-06-30 18:47 ` Song Liu
2021-06-30 20:09 ` Namhyung Kim
2021-07-01 20:16 ` Namhyung Kim
2021-06-30 18:50 ` Arnaldo Carvalho de Melo [this message]
2021-06-30 20:12 ` Namhyung Kim
2021-07-01 13:43 ` Arnaldo Carvalho de Melo
2021-07-01 17:10 ` Namhyung Kim
2021-06-27 15:29 ` [PATCHSET v4 0/4] perf stat: Enable BPF counters " Namhyung Kim
2021-06-30 6:19 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YNy85M22XZ8Sc/Gz@kernel.org \
--to=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=songliubraving@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).