[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200304190807.GA168640@krava>
Date: Wed, 4 Mar 2020 20:08:07 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Song Liu <songliubraving@...com>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, quentin@...valent.com,
kernel-team@...com, ast@...nel.org, daniel@...earbox.net,
arnaldo.melo@...il.com, jolsa@...nel.org
Subject: Re: [PATCH v4 bpf-next 0/4] bpftool: introduce prog profile
On Wed, Mar 04, 2020 at 10:07:06AM -0800, Song Liu wrote:
> This set introduces bpftool prog profile command, which uses hardware
> counters to profile BPF programs.
>
> This command attaches fentry/fexit programs to a target program. These two
> programs read hardware counters before and after the target program and
> calculate the difference.
>
> Changes v3 => v4:
> 1. Simplify err handling in profile_open_perf_events() (Quentin);
> 2. Remove redundant p_err() (Quentin);
> 3. Replace tab with space in bash-completion; (Quentin);
> 4. Fix typo _bpftool_get_map_names => _bpftool_get_prog_names (Quentin).
hum, I'm getting:
[jolsa@...l-r440-01 bpftool]$ pwd
/home/jolsa/linux-perf/tools/bpf/bpftool
[jolsa@...l-r440-01 bpftool]$ make
...
make[1]: Leaving directory '/home/jolsa/linux-perf/tools/lib/bpf'
LINK _bpftool
make: *** No rule to make target 'skeleton/profiler.bpf.c', needed by 'skeleton/profiler.bpf.o'. Stop.
jirka
>
> Changes v2 => v3:
> 1. Change order of arguments (Quentin), as:
> bpftool prog profile PROG [duration DURATION] METRICs
> 2. Add bash-completion for bpftool prog profile (Quentin);
> 3. Fix build of selftests (Yonghong);
> 4. Better handling of bpf_map_lookup_elem() returns (Yonghong);
> 5. Improve clean up logic of do_profile() (Yonghong);
> 6. Other smaller fixes/cleanups.
>
> Changes RFC => v2:
> 1. Use new bpf_program__set_attach_target() API;
> 2. Update output format to be perf-stat like (Alexei);
> 3. Incorporate skeleton generation into Makefile;
> 4. Make DURATION optional and Allow Ctrl-C (Alexei);
> 5. Add calcated values "insn per cycle" and "LLC misses per million isns".
>
> Song Liu (4):
> bpftool: introduce "prog profile" command
> bpftool: Documentation for bpftool prog profile
> bpftool: bash completion for "bpftool prog profile"
> bpftool: fix typo in bash-completion
>
> .../bpftool/Documentation/bpftool-prog.rst | 19 +
> tools/bpf/bpftool/Makefile | 18 +
> tools/bpf/bpftool/bash-completion/bpftool | 47 +-
> tools/bpf/bpftool/prog.c | 425 +++++++++++++++++-
> tools/bpf/bpftool/skeleton/profiler.bpf.c | 171 +++++++
> tools/bpf/bpftool/skeleton/profiler.h | 47 ++
> tools/scripts/Makefile.include | 1 +
> 7 files changed, 725 insertions(+), 3 deletions(-)
> create mode 100644 tools/bpf/bpftool/skeleton/profiler.bpf.c
> create mode 100644 tools/bpf/bpftool/skeleton/profiler.h
>
> --
> 2.17.1
>
Powered by blists - more mailing lists