All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC bpf-next 0/4] bpftool: introduce prog profile
@ 2020-02-13 21:01 Song Liu
  2020-02-13 21:01 ` [RFC bpf-next 1/4] bpf: allow bpf_perf_event_read_value in all BPF programs Song Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Song Liu @ 2020-02-13 21:01 UTC (permalink / raw)
  To: netdev, bpf; +Cc: kernel-team, ast, daniel, 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.

Sending as RFC because 2/4 will be replaced by Eelco Chaudron's work for
bpf_program__set_attach_target().

Please share your comments.

Thanks,
Song

Song Liu (4):
  bpf: allow bpf_perf_event_read_value in all BPF programs
  libbpf: introduce bpf_program__overwrite_section_name()
  bpftool: introduce "prog profile" command
  bpftool: Documentation for bpftool prog profile

 kernel/trace/bpf_trace.c                      |   4 +-
 .../bpftool/Documentation/bpftool-prog.rst    |  17 +
 tools/bpf/bpftool/profiler.skel.h             | 820 ++++++++++++++++++
 tools/bpf/bpftool/prog.c                      | 387 ++++++++-
 tools/bpf/bpftool/skeleton/README             |   3 +
 tools/bpf/bpftool/skeleton/profiler.bpf.c     | 185 ++++
 tools/bpf/bpftool/skeleton/profiler.h         |  47 +
 tools/lib/bpf/libbpf.c                        |  13 +-
 tools/lib/bpf/libbpf.h                        |   4 +
 tools/lib/bpf/libbpf.map                      |   5 +
 10 files changed, 1481 insertions(+), 4 deletions(-)
 create mode 100644 tools/bpf/bpftool/profiler.skel.h
 create mode 100644 tools/bpf/bpftool/skeleton/README
 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] 10+ messages in thread

end of thread, other threads:[~2020-02-17  2:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-13 21:01 [RFC bpf-next 0/4] bpftool: introduce prog profile Song Liu
2020-02-13 21:01 ` [RFC bpf-next 1/4] bpf: allow bpf_perf_event_read_value in all BPF programs Song Liu
2020-02-13 21:01 ` [RFC bpf-next 2/4] libbpf: introduce bpf_program__overwrite_section_name() Song Liu
2020-02-13 21:01 ` [RFC bpf-next 3/4] bpftool: introduce "prog profile" command Song Liu
2020-02-13 21:50   ` Toke Høiland-Jørgensen
2020-02-13 21:55     ` Song Liu
2020-02-13 22:06       ` Toke Høiland-Jørgensen
2020-02-15  0:45   ` Alexei Starovoitov
2020-02-17  2:51     ` Song Liu
2020-02-13 21:01 ` [RFC bpf-next 4/4] bpftool: Documentation for bpftool prog profile Song Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.