From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760307AbdEVWsy (ORCPT ); Mon, 22 May 2017 18:48:54 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:55996 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752132AbdEVWsn (ORCPT ); Mon, 22 May 2017 18:48:43 -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 net-next 0/2] perf, bpf: add support for HW_CACHE and RAW events Date: Mon, 22 May 2017 15:48:38 -0700 Message-ID: <20170522224840.810121-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-05-22_11:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Patch 1: add support for HW_CACHE and RAW perf events to bpf: - similar to PERF_TYPE_RAW and PERF_TYPE_HARDWARE allow PERF_TYPE_HW_CACHE events to be accessed via bpf_perf_event_read() - similar to PERF_TYPE_HARDWARE and PERF_TYPE_SOFTWARE allow bpf programs to attch to PERF_TYPE_HW_CACHE and PERF_TYPE_RAW events as BPF_PROG_TYPE_PERF_EVENT program type Patch 2: add tests for HW_CACHE and RAW events --- Peter, please review patch 1. It looks trivial and as far as we can see nothing else needed. The existing perf+bpf infra covers it just fine. Thanks! Teng Qin (2): perf, bpf: add support for HW_CACHE and RAW events samples/bpf: add samples for HW_CACHE / RAW events kernel/bpf/arraymap.c | 1 + kernel/events/core.c | 4 +- kernel/trace/bpf_trace.c | 1 + samples/bpf/bpf_helpers.h | 2 +- samples/bpf/trace_event_user.c | 46 +++++++++++- samples/bpf/tracex6_kern.c | 28 ++++++-- samples/bpf/tracex6_user.c | 155 +++++++++++++++++++++++++++++++---------- 7 files changed, 187 insertions(+), 50 deletions(-) -- 2.9.3