bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next 0/2] bpftool: introduce prog profile
@ 2020-02-28 23:40 Song Liu
  2020-02-28 23:40 ` [PATCH v2 bpf-next 1/2] bpftool: introduce "prog profile" command Song Liu
  2020-02-28 23:40 ` [PATCH v2 bpf-next 2/2] bpftool: Documentation for bpftool prog profile Song Liu
  0 siblings, 2 replies; 15+ messages in thread
From: Song Liu @ 2020-02-28 23:40 UTC (permalink / raw)
  To: netdev, bpf; +Cc: kernel-team, ast, daniel, arnaldo.melo, jolsa, Song Liu

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-03-03 13:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-28 23:40 [PATCH v2 bpf-next 0/2] bpftool: introduce prog profile Song Liu
2020-02-28 23:40 ` [PATCH v2 bpf-next 1/2] bpftool: introduce "prog profile" command Song Liu
2020-03-01  3:52   ` Yonghong Song
2020-03-01 22:37     ` Song Liu
2020-03-02  3:42       ` Yonghong Song
2020-03-02  4:26         ` Yonghong Song
2020-03-01  4:14   ` Yonghong Song
2020-03-01 22:37     ` Song Liu
2020-03-02  4:24   ` Yonghong Song
2020-03-03  0:10     ` Song Liu
2020-03-03 13:06       ` Arnaldo Carvalho de Melo
2020-03-02 13:36   ` Quentin Monnet
2020-03-02 16:52     ` Song Liu
2020-02-28 23:40 ` [PATCH v2 bpf-next 2/2] bpftool: Documentation for bpftool prog profile Song Liu
2020-03-02 13:36   ` Quentin Monnet

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).