Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753371AbbGBNvp (ORCPT ); Thu, 2 Jul 2015 09:51:45 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:29668 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752924AbbGBNvP (ORCPT ); Thu, 2 Jul 2015 09:51:15 -0400 From: He Kuang To: , , , , , , , CC: , , Subject: [RFC PATCH v2 0/4] Make eBPF programs output data to perf event Date: Thu, 2 Jul 2015 13:50:39 +0000 Message-ID: <1435845043-107196-1-git-send-email-hekuang@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <559386D7.1020208@huawei.com> References: <559386D7.1020208@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.197.210] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1632 Lines: 46 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/