On Tue, Aug 6, 2019 at 4:39 PM Daniel Xu <dxu@xxxxxxxxx> wrote: > > It's useful to know kprobe's nmissed and nhit stats. For example with Is nmissed/nhit kprobe-specific? What about tracepoints and raw tracepoints, do they have something similar or they can never be missed? At least nhit still seems useful, so would be nice to have ability to get that with the same API, is it possible? > 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 >