Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2338925imu; Tue, 6 Nov 2018 12:54:59 -0800 (PST) X-Google-Smtp-Source: AJdET5cN2GgIqOCpkHzdw0YNRt1I53hP0+ntUvq16+Q8QMyg9AjTUWfVIl6QjJGr5oD0imBZjb2W X-Received: by 2002:aa7:814f:: with SMTP id d15-v6mr28040136pfn.78.1541537699190; Tue, 06 Nov 2018 12:54:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541537699; cv=none; d=google.com; s=arc-20160816; b=ilTNNIYVyrHE6M+PTfdPZg2DXL10o01/TX75ImPdXjh047CUoUMXUa5e2wLlrPJWmn GK00hN/fPMFKh5XXEAmru7Ur/+MdM7vD+kSzWVk/DNG1uVMsfrNE8eLnJTGGL2pKoMbD fltbBYJYrHOHwSTgP06uSa4FDdQRWapBmny0WvaZN46agTSZEWgWuWX96a6HBBjVZM7W 2eniB9XUMIJW1HwPeICBYiUoJUhdxxrZzDhjiwYnvxqy98eJFjlm9mZmN2a/eTIzes7A BYBoqI2Q1kn/okDKjhnD/1FMMcFG+7UrudCpQ4364ucWJr/gmCVlgBjENoc3ZXpiCePS cpuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:smtp-origin-cluster:cc:to :smtp-origin-hostname:from:smtp-origin-hostprefix:dkim-signature; bh=Vw3p/YklCg8jmG6s30NHLjzjrMF6EiXQ3dnTtQ4otw0=; b=vGj44JwaTw4HBrk5ai4B4gkWaw8/oz1ylA4Iu6S8IZnllZ2SqJGe1feudG7OFcTy1J kP1dZMe4BcKfaBFi5/Jx+wnRJMmA4aCsjQ65tb1/QU+O91QroOHlleSV/Z9HcTC8uYSx 3sIk+PeK+qS9B++2pJGhA6S+zfC5rLDtsaZey0bSQ9m5tNk+jhcMvYEwiu+yC0SrBIz1 D8N9fo4kx+M8hQqG9lmFLgtt5hj9z5Qs8Ty8edqT6duxYnlDQOmBC3XHwzK0nHMF7YnU KJMxwYLnfo5aUZYWBzUf4Ynm+KdBFwg/4iHOg08bQSNE+PA9nLmDbrJrbxYaVekjX0Qg YMjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=phLZKwtD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13si11211909pgk.165.2018.11.06.12.54.44; Tue, 06 Nov 2018 12:54:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=phLZKwtD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730883AbeKGGVI (ORCPT + 99 others); Wed, 7 Nov 2018 01:21:08 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:51126 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726755AbeKGGVI (ORCPT ); Wed, 7 Nov 2018 01:21:08 -0500 Received: from pps.filterd (m0044010.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wA6Kokv5001661 for ; Tue, 6 Nov 2018 12:54:03 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=Vw3p/YklCg8jmG6s30NHLjzjrMF6EiXQ3dnTtQ4otw0=; b=phLZKwtDB9INk3BykDWrb++3o3EvOshods/fXq9gv5AV/nCeB0mygtMSzk9ZlYLHOIZ2 u7pIbh57MULWjVeBik0ZiDR13m5v0MESFLiPVK4BAvQgCoqiKhIm1KgYbkPk3UhyuqHi NSgmFL5tWFbGWuh0FgDxHgtYiF23sgXsz4A= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2nkf2xrp12-14 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 06 Nov 2018 12:54:03 -0800 Received: from mx-out.facebook.com (2620:10d:c081:10::13) by mail.thefacebook.com (2620:10d:c081:35::125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1531.3; Tue, 6 Nov 2018 12:53:31 -0800 Received: by devbig006.ftw2.facebook.com (Postfix, from userid 4523) id 274B762E1CAE; Tue, 6 Nov 2018 12:53:25 -0800 (PST) Smtp-Origin-Hostprefix: devbig From: Song Liu Smtp-Origin-Hostname: devbig006.ftw2.facebook.com To: , CC: , Song Liu , , , , Smtp-Origin-Cluster: ftw2c04 Subject: [RFC perf,bpf 2/5] perf: sync tools/include/uapi/linux/perf_event.h Date: Tue, 6 Nov 2018 12:52:43 -0800 Message-ID: <20181106205246.567448-3-songliubraving@fb.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181106205246.567448-1-songliubraving@fb.com> References: <20181106205246.567448-1-songliubraving@fb.com> X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-06_10:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sync changes for PERF_RECORD_BPF_EVENT. Signed-off-by: Song Liu --- tools/include/uapi/linux/perf_event.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h index f35eb72739c0..d51cacb3077a 100644 --- a/tools/include/uapi/linux/perf_event.h +++ b/tools/include/uapi/linux/perf_event.h @@ -372,7 +372,8 @@ struct perf_event_attr { context_switch : 1, /* context switch data */ write_backward : 1, /* Write ring buffer from end to beginning */ namespaces : 1, /* include namespaces data */ - __reserved_1 : 35; + bpf_event : 1, /* include bpf events */ + __reserved_1 : 34; union { __u32 wakeup_events; /* wakeup every n events */ @@ -963,9 +964,33 @@ enum perf_event_type { */ PERF_RECORD_NAMESPACES = 16, + /* + * Record different types of bpf events: + * enum perf_bpf_event_type { + * PERF_BPF_EVENT_UNKNOWN = 0, + * PERF_BPF_EVENT_PROG_LOAD = 1, + * PERF_BPF_EVENT_PROG_UNLOAD = 2, + * }; + * + * struct { + * struct perf_event_header header; + * u16 type; + * u16 flags; + * u32 id; // prog_id or map_id + * }; + */ + PERF_RECORD_BPF_EVENT = 17, + PERF_RECORD_MAX, /* non-ABI */ }; +enum perf_bpf_event_type { + PERF_BPF_EVENT_UNKNOWN = 0, + PERF_BPF_EVENT_PROG_LOAD = 1, + PERF_BPF_EVENT_PROG_UNLOAD = 2, + PERF_BPF_EVENT_MAX, /* non-ABI */ +}; + #define PERF_MAX_STACK_DEPTH 127 #define PERF_MAX_CONTEXTS_PER_STACK 8 -- 2.17.1