2015-04-16 18:09:07

by Vince Weaver

[permalink] [raw]
Subject: [patch 03/10] perf_event_open.2: 4.1 PERF_EVENT_IOC_SET_BPF support


This manpage patch relates to the addition of the
PERF_EVENT_IOC_SET_BPF ioctl in the following commit:

commit 2541517c32be2531e0da59dfd7efc1ce844644f5
Author: Alexei Starovoitov <[email protected]>

tracing, perf: Implement BPF programs attached to kprobes

Signed-off-by: Alexei Starovoitov <[email protected]>
Reviewed-by: Steven Rostedt <[email protected]>
Reviewed-by: Masami Hiramatsu <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>


Signed-off-by: Vince Weaver <[email protected]>

diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2
index 01ee579..e08288e 100644
--- a/man2/perf_event_open.2
+++ b/man2/perf_event_open.2
@@ -2480,6 +2480,16 @@ This returns the event ID value for the given event file descriptor.

The argument is a pointer to a 64-bit unsigned integer
to hold the result.
+.TP
+.BR PERF_EVENT_IOC_SET_BPF " (since Linux 4.1)"
+.\" commit 2541517c32be2531e0da59dfd7efc1ce844644f5
+This allows attaching a Berkeley Packet Filter (BPF)
+program to an existing kprobe tracepoint event.
+
+The argument is a BPF program id that was created by
+a previous
+.BR bpf (2)
+system call.
.SS Using prctl
A process can enable or disable all the event groups that are
attached to it using the


2015-04-16 19:00:25

by Alexei Starovoitov

[permalink] [raw]
Subject: Re: [patch 03/10] perf_event_open.2: 4.1 PERF_EVENT_IOC_SET_BPF support

On 4/16/15 11:13 AM, Vince Weaver wrote:
>
> This manpage patch relates to the addition of the
> PERF_EVENT_IOC_SET_BPF ioctl in the following commit:
>
> Signed-off-by: Vince Weaver <[email protected]>
>
> +.TP
> +.BR PERF_EVENT_IOC_SET_BPF " (since Linux 4.1)"
> +.\" commit 2541517c32be2531e0da59dfd7efc1ce844644f5
> +This allows attaching a Berkeley Packet Filter (BPF)
> +program to an existing kprobe tracepoint event.
> +
> +The argument is a BPF program id that was created by

... is a BPF program FD ...

other than that it looks good. Thank you for documenting!

btw, I'll refresh my month old bpf(2) patch:
http://thread.gmane.org/gmane.linux.man/8676
with the latest details and repost.