Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp269110imu; Wed, 21 Nov 2018 19:37:51 -0800 (PST) X-Google-Smtp-Source: AFSGD/X6CUlKxMMCQyzKzkzWbILQFz5xaANrUV93J2MCI4ME69skoJv0HZmSEbOAwSvS5NPG99oD X-Received: by 2002:a17:902:7481:: with SMTP id h1mr9562880pll.341.1542857871044; Wed, 21 Nov 2018 19:37:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542857870; cv=none; d=google.com; s=arc-20160816; b=VbPmQ1dMB9gRC9j2HzHm11VcN3Vxndc9zOMEABovLnYLp5KJ4/AJ8C8roc/guyPSa6 /rQiX8kusOzcysxvWAKu7jQpmH+VseoIhUKOd6V0zzrDog2sFEUoIENgFX+xFWXspTQ2 5iyjOtckGHKbfW7+731rPzHry9WjoBiBkyDJlC3pw8118jTKZUCACLw7YKkWq0eb8eXH cynTjC1HTtcLsIP7iM48FHfoFSPrTVTWWR8Wc+Ba9iRJudxLJm++zPiFwFjxg8EynL3c JTBeWonlzGT3c8xjQouQcCfc3VOCnDA8OuHbL78WQaE6GrA/WEsnLQUFFTstCG/QutUY T/AA== 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=RYnsfPM9FDotIwJh49UrK17B6KByT9Y4UU/9dpJQ5J4=; b=poK4Av4rkZvOxtA4f3f45riTRyP3cO0AzAFgxLQz1pzwCpwR+j+xqCoWwLSLyCJy31 VV+o88R71zw+FxwdOBioWNk9KNn9i6w22Yq5N14NSPcuCiVqzLzxM/OZxpc6mvksZVd5 XKZDTKlQnuY1wzuHUFE0NCSOSsuzUPpADkW4bDqUvZBTWrbqGlQxGZBNO10dAETsw2e2 uZGdLi/9T6wAb/B9Pp7Hhz2kzBVlY7mZ/HxDaMmQc/5tq1flzbNL0wzXWVGN/D5b9NPB 0Waymq+kZe1maGkjprt3ihcfsKOPd0BPGiUL78zpMB5vAMEFbPNaCnB2+meqrFKoFT3D VJAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b="j/Q55UGg"; 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 h3-v6si24429768plh.390.2018.11.21.19.37.20; Wed, 21 Nov 2018 19:37:50 -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="j/Q55UGg"; 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 S2387863AbeKVGb0 (ORCPT + 99 others); Thu, 22 Nov 2018 01:31:26 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:60812 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387514AbeKVGbZ (ORCPT ); Thu, 22 Nov 2018 01:31:25 -0500 Received: from pps.filterd (m0001255.ppops.net [127.0.0.1]) by mx0b-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wALJpRLG002479 for ; Wed, 21 Nov 2018 11:55:42 -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=RYnsfPM9FDotIwJh49UrK17B6KByT9Y4UU/9dpJQ5J4=; b=j/Q55UGgzOlvbo7eZs1/GDbhXEzZK2/B1/4QQU/oTksbRYq3/TV8SADEASsl6YywbNFW X1+mmXqbyedFCI6z/x/LH/UAoMOeMkFOrvHVsMSSTnxbbHeAb98YcTWCX6ggPinLi0uw scvLioi8CpEKpkhbUMkpLFAkQS+ocXAgeg4= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0b-00082601.pphosted.com with ESMTP id 2nwdmtr27g-14 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 21 Nov 2018 11:55:42 -0800 Received: from mx-out.facebook.com (2620:10d:c0a1:3::13) by mail.thefacebook.com (2620:10d:c021:18::173) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1531.3; Wed, 21 Nov 2018 11:55:35 -0800 Received: by devbig006.ftw2.facebook.com (Postfix, from userid 4523) id D27AE62E1804; Wed, 21 Nov 2018 11:55:33 -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: [PATCH perf,bpf 2/5] perf: sync tools/include/uapi/linux/perf_event.h Date: Wed, 21 Nov 2018 11:54:59 -0800 Message-ID: <20181121195502.3259930-3-songliubraving@fb.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181121195502.3259930-1-songliubraving@fb.com> References: <20181121195502.3259930-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-21_09:,, 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..72a7da2b713f 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