[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200228234058.634044-1-songliubraving@fb.com>
Date: Fri, 28 Feb 2020 15:40:56 -0800
From: Song Liu <songliubraving@...com>
To: <netdev@...r.kernel.org>, <bpf@...r.kernel.org>
CC: <kernel-team@...com>, <ast@...nel.org>, <daniel@...earbox.net>,
<arnaldo.melo@...il.com>, <jolsa@...nel.org>,
Song Liu <songliubraving@...com>
Subject: [PATCH v2 bpf-next 0/2] bpftool: introduce prog profile
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 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 (2):
bpftool: introduce "prog profile" command
bpftool: Documentation for bpftool prog profile
.../bpftool/Documentation/bpftool-prog.rst | 17 +
tools/bpf/bpftool/Makefile | 18 +
tools/bpf/bpftool/prog.c | 428 +++++++++++++++++-
tools/bpf/bpftool/skeleton/profiler.bpf.c | 171 +++++++
tools/bpf/bpftool/skeleton/profiler.h | 47 ++
tools/scripts/Makefile.include | 1 +
6 files changed, 681 insertions(+), 1 deletion(-)
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