Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751216AbdFCEET (ORCPT ); Sat, 3 Jun 2017 00:04:19 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:58190 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750876AbdFCED6 (ORCPT ); Sat, 3 Jun 2017 00:03:58 -0400 Smtp-Origin-Hostprefix: devbig From: Alexei Starovoitov Smtp-Origin-Hostname: devbig500.prn1.facebook.com To: "David S . Miller" CC: Peter Zijlstra , Brendan Gregg , Daniel Borkmann , Teng Qin , , , Smtp-Origin-Cluster: prn1c29 Subject: [PATCH v4 net-next 0/3] bpf: Add BPF support to all perf_event Date: Fri, 2 Jun 2017 21:03:51 -0700 Message-ID: <20170603040354.3580555-1-ast@fb.com> X-Mailer: git-send-email 2.9.3 X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-02_10:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1224 Lines: 33 v3->v4: one more tweak to reject unsupported events at map update time as Peter suggested v2->v3: more refactoring to address Peter's feedback. Now all perf_events are attachable and readable v1->v2: address Peter's feedback. Refactor patch 1 to allow attaching bpf programs to all event types and reading counters from all of them as well patch 2 - more tests patch 3 - address Dave's feedback and document bpf_perf_event_read() and bpf_perf_event_output() properly Alexei Starovoitov (1): perf, bpf: Add BPF support to all perf_event types Teng Qin (2): samples/bpf: add tests for more perf event types bpf: update perf event helper functions documentation include/linux/perf_event.h | 7 +- include/uapi/linux/bpf.h | 11 ++- kernel/bpf/arraymap.c | 28 ++----- kernel/events/core.c | 47 ++++++----- kernel/trace/bpf_trace.c | 21 ++--- samples/bpf/bpf_helpers.h | 3 +- samples/bpf/trace_event_user.c | 73 ++++++++++++++--- samples/bpf/tracex6_kern.c | 28 +++++-- samples/bpf/tracex6_user.c | 180 ++++++++++++++++++++++++++++++++--------- tools/include/uapi/linux/bpf.h | 11 ++- 10 files changed, 290 insertions(+), 119 deletions(-) -- 2.9.3