Re: [RFC 0/4] perf record: Implement off-cpu profiling with BPF (v1)

From: Jiri Olsa
Date: Fri Apr 22 2022 - 06:11:41 EST


On Thu, Apr 21, 2022 at 10:33:57PM -0700, Namhyung Kim wrote:

SNIP

> The perf bench sched messaging created 400 processes to send/receive
> messages through unix sockets. It spent a large portion of cpu cycles
> for audit filter and read/copy the messages while most of the
> offcpu-time was in read and write calls.
>
> You can get the code from 'perf/offcpu-v1' branch in my tree at
>
> git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git
>
> Enjoy! :)

CC builtin-record.o
builtin-record.c:52:10: fatal error: util/off_cpu.h: No such file or directory
52 | #include "util/off_cpu.h"

forgot to add util/off_cpu.h ?

jirka

>
> Thanks,
> Namhyung
>
>
> Namhyung Kim (4):
> perf report: Do not extend sample type of bpf-output event
> perf record: Enable off-cpu analysis with BPF
> perf record: Implement basic filtering for off-cpu
> perf record: Handle argument change in sched_switch
>
> tools/perf/Makefile.perf | 1 +
> tools/perf/builtin-record.c | 21 ++
> tools/perf/util/Build | 1 +
> tools/perf/util/bpf_off_cpu.c | 301 +++++++++++++++++++++++++
> tools/perf/util/bpf_skel/off_cpu.bpf.c | 214 ++++++++++++++++++
> tools/perf/util/evsel.c | 4 +-
> 6 files changed, 540 insertions(+), 2 deletions(-)
> create mode 100644 tools/perf/util/bpf_off_cpu.c
> create mode 100644 tools/perf/util/bpf_skel/off_cpu.bpf.c
>
>
> base-commit: 41204da4c16071be9090940b18f566832d46becc
> --
> 2.36.0.rc2.479.g8af0fa9b8e-goog
>