Messages in this thread | | | Date | Mon, 13 Jul 2015 20:08:20 -0700 | From | Alexei Starovoitov <> | Subject | Re: [RFC PATCH v5 3/3] bpf: Introduce function for outputing trace event data |
| |
On 7/13/15 6:59 PM, He Kuang wrote: > There're scenarios that we need an eBPF program to record not only > kprobe point args, but also the PMU counters, time latencies or the > number of cache misses between two probe points and other information > when the probe point is entered. > > This patch adds a new trace event to establish infrastruction for bpf to > output data to perf. Userspace perf tools can detect and use this event > as using the existing tracepoint events. > > New bpf trace event entry in debugfs: > > /sys/kernel/debug/tracing/events/bpf/bpf_output_data > > Userspace perf tools detect the new tracepoint event as: > > bpf:bpf_output_data [Tracepoint event] > > Data in ring-buffer of perf events added to this event will be polled > out, sample types and other attributes can be adjusted to those events > directly without touching the original kprobe events. > > The bpf helper function gives eBPF program ability to output data as > perf sample event. This helper simple call the new trace event and > userspace perf tools can record the BPF ftrace event to collect those > records. > > Signed-off-by: He Kuang<hekuang@huawei.com>
Looks good to me. Acked-by: Alexei Starovoitov <ast@plumgrid.com>
| |