Messages in this thread | | | From | He Kuang <> | Subject | [RFC PATCH v2 0/4] Make eBPF programs output data to perf event | Date | Thu, 2 Jul 2015 13:50:39 +0000 |
| |
Hi,
Accordint to the discussion on patchset v1, it seems an extra perf_trace_buf is reduntant, this patch removes the additional buffer and stores bpf output into a temporary region at the ending of the original perf_trace_buf. The temporary region will be moved back to the proper offset of perf_trace_buf at the stage of perf_trace_prepare_buf.
v1-v2:
- Remove additional perf_trace_buf. Use the end of perf_trace_buf as a temporary region to store bpf data.
- Rename bpf_output_sample to bpf_output_data.
- New bpf API added to the end of the function list.
Thank you.
He Kuang (4): bpf: Put perf_events check ahead of bpf prog tracing/kprobe: Separate inc recursion count out of perf_trace_buf_prepare bpf: Introduce function for outputing data to perf event tracing/kprobe: Combine bpf output and perf event output
include/linux/ftrace_event.h | 4 +++ include/linux/perf_event.h | 2 ++ include/uapi/linux/bpf.h | 3 ++ kernel/events/core.c | 6 ++++ kernel/events/internal.h | 17 ++++++---- kernel/trace/bpf_trace.c | 29 +++++++++++++++++ kernel/trace/trace_event_perf.c | 56 +++++++++++++++++++++++++++++--- kernel/trace/trace_kprobe.c | 72 ++++++++++++++++++++++++++++++++++------- samples/bpf/bpf_helpers.h | 2 ++ 9 files changed, 167 insertions(+), 24 deletions(-)
-- 1.8.5.2
| |