Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp184450imu; Thu, 20 Dec 2018 19:45:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/VdFQaIccp690ZzV98hLEFIPxhxp0TkPgd6AUGlPgfA6K8b7DGcttELZtpIKmuxZOPSOlQx X-Received: by 2002:a62:81c1:: with SMTP id t184mr925762pfd.40.1545363954831; Thu, 20 Dec 2018 19:45:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545363954; cv=none; d=google.com; s=arc-20160816; b=ioY1SMdX+DButTDYu2w8GW2m1qZ4QsdYJymHPlj7+ogN0rFAnnY6/JJYawmjX2gsKa m6ZUEMQuxbI+l29XR8AtcGBdBahMntXAr4xjN9yPJp1gRJ/TbdIBBZRMrP+PK2yGjRE0 hpiGTPvv4WPbpv9r402SIjUYAHJlkK7tvP6dcQnfIzkctKtCfYJMRoApZb9mOcD8r+aQ sM0FceejSC+ahDZ39bquC4owzY9uSd/MKKO5T02gUcgvKsaDTP0XlgN1vtlx96QCc9xt 8cD+wBZWT7FS6QmnRQGCjnj4NC2Sw9Xfogt0c3dTX53P8JN2Zf7PZdRWwuMWJH4oyNpX o/Wg== 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=KSZoaMUUYm7bYjwf8c1NpeReuEk9zp8DLbjCESJKmbk=; b=Yhd7PcpGw4QTqyP7EyFMDtSmKK5I2c5V6bGHF4oirfEf621wms+pSTBxdK63walJdn ruS6OGzDON+9EQrV15JeDUyIm8v7PnRqCypXcv7MEOUkd+ePPsIIG40/f+3zXTA1f4ha nCNSfr4NlDk+dqbJpGuc9LcuPFH2aMGDPkR0lG0r9mXD9SXN3hzs1itoQ7JagLsfc4mL eKT2Ez259z8watl/1dGcILfGBuoRtmk06v/d1wY/nHotcuzd4tvVGcbshe3H4vR4jvNe r2TgsPSbeSyiZegkqdqayy9uTrdp5Ui5TEYMulNyaXfqAxc2q1Hd75DlTJQLeRCz95OE THfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=kStPtxSW; 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 u4si12902392pga.91.2018.12.20.19.45.39; Thu, 20 Dec 2018 19:45:54 -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=kStPtxSW; 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 S2389092AbeLTS3V (ORCPT + 99 others); Thu, 20 Dec 2018 13:29:21 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:48948 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389081AbeLTS3T (ORCPT ); Thu, 20 Dec 2018 13:29:19 -0500 Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wBKIP4nZ000728 for ; Thu, 20 Dec 2018 10:29:18 -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=KSZoaMUUYm7bYjwf8c1NpeReuEk9zp8DLbjCESJKmbk=; b=kStPtxSWCfp9SRP2WlVPwGkMvZf6uUB5gYAMwoFyB/SWQRIFPfED25uR77G4Fa+mdS+t afAlEoI3HpqlNkjAPRrRfmjKYVb+Ef7BkgF4KTsVLHTJoE0Sz1t+q21oLCx+8O7npTcV smsHVFD0qwBTS/n8U8IiZuLniP7iPkoa13o= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2pgf8xg9ct-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 20 Dec 2018 10:29:18 -0800 Received: from mx-out.facebook.com (2620:10d:c081:10::13) by mail.thefacebook.com (2620:10d:c081:35::130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1531.3; Thu, 20 Dec 2018 10:29:16 -0800 Received: by devbig006.ftw2.facebook.com (Postfix, from userid 4523) id 4C98362E0FD0; Thu, 20 Dec 2018 10:29:07 -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 v5 perf, bpf-next 2/7] sync tools/include/uapi/linux/perf_event.h Date: Thu, 20 Dec 2018 10:28:59 -0800 Message-ID: <20181220182904.4193196-3-songliubraving@fb.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181220182904.4193196-1-songliubraving@fb.com> References: <20181220182904.4193196-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-12-20_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_KSYMBOL Signed-off-by: Song Liu --- tools/include/uapi/linux/perf_event.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h index 9de8780ac8d9..6c9e327e87ed 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; + ksymbol : 1, /* include ksymbol events */ + __reserved_1 : 34; union { __u32 wakeup_events; /* wakeup every n events */ @@ -648,11 +649,18 @@ struct perf_event_mmap_page { * PERF_RECORD_MISC_COMM_EXEC - PERF_RECORD_COMM event * PERF_RECORD_MISC_FORK_EXEC - PERF_RECORD_FORK event (perf internal) * PERF_RECORD_MISC_SWITCH_OUT - PERF_RECORD_SWITCH* events + * PERF_RECORD_MISC_KSYMBOL_* - PERF_RECORD_KSYMBOL event */ #define PERF_RECORD_MISC_MMAP_DATA (1 << 13) #define PERF_RECORD_MISC_COMM_EXEC (1 << 13) #define PERF_RECORD_MISC_FORK_EXEC (1 << 13) #define PERF_RECORD_MISC_SWITCH_OUT (1 << 13) + +#define PERF_RECORD_MISC_KSYMBOL_UNREGISTER (1 << 3) +#define PERF_RECORD_MISC_KSYMBOL_TYPE_MASK (7 << 4) +#define PERF_RECORD_MISC_KSYMBOL_TYPE_UNKNOWN (0 << 4) +#define PERF_RECORD_MISC_KSYMBOL_TYPE_BPF (1 << 4) + /* * These PERF_RECORD_MISC_* flags below are safely reused * for the following events: @@ -965,6 +973,19 @@ enum perf_event_type { */ PERF_RECORD_NAMESPACES = 16, + /* + * Record ksymbol register/unregister events: + * + * struct { + * struct perf_event_header header; + * u64 addr; + * u64 len; + * char name[]; + * struct sample_id sample_id; + * }; + */ + PERF_RECORD_KSYMBOL = 17, + PERF_RECORD_MAX, /* non-ABI */ }; -- 2.17.1