bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add PERF_EVENT_IOC_QUERY_KPROBE ioctl
@ 2019-08-06 23:38 Daniel Xu
  2019-08-07  5:24 ` Yonghong Song
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daniel Xu @ 2019-08-06 23:38 UTC (permalink / raw)
  To: songliubraving, yhs, andriin; +Cc: Daniel Xu, bpf, kernel-team

It's useful to know kprobe's nmissed and nhit stats. For example with
tracing tools, it's important to know when events may have been lost.
There is currently no way to get that information from the perf API.
This patch adds a new ioctl that lets users query this information.

Daniel Xu (3):
  tracing/kprobe: Add PERF_EVENT_IOC_QUERY_KPROBE ioctl
  libbpf: Add helper to extract perf fd from bpf_link
  tracing/kprobe: Add self test for PERF_EVENT_IOC_QUERY_KPROBE

 include/linux/trace_events.h                  |  6 +++
 include/uapi/linux/perf_event.h               | 23 ++++++++++
 kernel/events/core.c                          | 11 +++++
 kernel/trace/trace_kprobe.c                   | 25 +++++++++++
 tools/include/uapi/linux/perf_event.h         | 23 ++++++++++
 tools/lib/bpf/libbpf.c                        | 13 ++++++
 tools/lib/bpf/libbpf.h                        |  1 +
 tools/lib/bpf/libbpf.map                      |  5 +++
 .../selftests/bpf/prog_tests/attach_probe.c   | 43 +++++++++++++++++++
 9 files changed, 150 insertions(+)

-- 
2.20.1


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

end of thread, other threads:[~2019-08-09 17:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-06 23:38 [PATCH 0/3] Add PERF_EVENT_IOC_QUERY_KPROBE ioctl Daniel Xu
2019-08-07  5:24 ` Yonghong Song
2019-08-07 17:49 ` Song Liu
2019-08-07 19:03 ` Andrii Nakryiko
2019-08-08 22:32   ` Daniel Xu
2019-08-09 17:18     ` Andrii Nakryiko

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