Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1089719imu; Wed, 9 Jan 2019 11:25:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN7caTJ3Ja0Ish5ItNFZ0/nU0f2/6P7MTN6al2MV8pN2FN0LoFFouvNJsuPCbosVivIKNOjc X-Received: by 2002:a63:e20a:: with SMTP id q10mr6397999pgh.206.1547061931939; Wed, 09 Jan 2019 11:25:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547061931; cv=none; d=google.com; s=arc-20160816; b=YhGgLnROLI0TwWpt3IMTDSnA7nV8S4Kas8TPPV22vr4qeQpsSdTjQnnRtPUrMeDCS6 MWqg/PIk0W17ftXYm5JhEsHsBZqrsKlNKnGglCWxTs8rRYtDCYejxaUe+X+QX7PzQBuA oDeBIBVsueL6mwi6nquiqTL5jFj3vhILBtisDa4jPe5VX5eM+e5BKws/dva2WGgIVrJP 0nxYb3S2wTULbGM/Zn4y1vw6yuFf05zKNYpVqKv/xtRzbiqv6ZPO4M3+jEy/CTR/Ccrf cXxtHZXTDvQNS9e6DJwmfhulKygenpQAin+02q4ZZLG3FlJMC+smU7eUyH/IaYJmTmWu vurQ== 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=xkc/m6L5gIetS+MM8nNA5Dq8r/hwzty2qHxIbJneJL4=; b=diP0ZN0SDIWTojC5199brg1NWDrTgsu+CCV7Vr1btGYsw7/1Zzn4dDCQ0NuPwWgnE7 CZduco9N5okAu9iGpvfcMNekCRS+/1UksyMsoeQYGyGTGtrQ168Ff/8RSKqHO3/HlMfw SLIYx+kj5lImdZhznpBRUFNdltJgGIDmjIlck3oxru+G9G2rhBXK15mw8tSL3pw3EkIm lUNnr5RSuKiOQlqTFUzumxd/ccnwAoEGzVtVXL2FTA2jLcc9afGRYxCsi3WLny0UkZmx OYc0FEGrgh/FYK4KcZ1gfaMfUpkISPGKuOswjKt3jlSXFEN7hKm7aYVh0Z3UP98IV7z5 f0Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=qvM1z4Li; 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 y27si65297265pga.459.2019.01.09.11.25.16; Wed, 09 Jan 2019 11:25:31 -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=qvM1z4Li; 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 S1728436AbfAITWg (ORCPT + 99 others); Wed, 9 Jan 2019 14:22:36 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:54730 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728173AbfAITWf (ORCPT ); Wed, 9 Jan 2019 14:22:35 -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 x09J6gXr028656 for ; Wed, 9 Jan 2019 11:22:35 -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=xkc/m6L5gIetS+MM8nNA5Dq8r/hwzty2qHxIbJneJL4=; b=qvM1z4LiIuEwij4J517iY5E1IDMG8SkeQpGkq5ftuwIiD3pxs/ON3AEb0xbvMucuLULd fNvZ0gfoFTiO5WLo9hZdlHyNiKxf62z3e0vZHUHjR6fh+PmXNAD5F/BUgL6T+Or6h5dR kTGcRqG6zs83dY4sZYcaoqHl9uIPgxaqd5I= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2pwptw81q2-14 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 09 Jan 2019 11:22:34 -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, 9 Jan 2019 11:21:42 -0800 Received: by devbig006.ftw2.facebook.com (Postfix, from userid 4523) id 5A17862E1BA5; Wed, 9 Jan 2019 11:21:37 -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 v6 perf, bpf-next 2/7] sync tools/include/uapi/linux/perf_event.h Date: Wed, 9 Jan 2019 11:21:06 -0800 Message-ID: <20190109192111.130995-3-songliubraving@fb.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190109192111.130995-1-songliubraving@fb.com> References: <20190109192111.130995-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=2019-01-09_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_KSYMBOL Signed-off-by: Song Liu --- tools/include/uapi/linux/perf_event.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h index 9de8780ac8d9..68c4da0227c5 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 */ @@ -965,9 +966,32 @@ enum perf_event_type { */ PERF_RECORD_NAMESPACES = 16, + /* + * Record ksymbol register/unregister events: + * + * struct { + * struct perf_event_header header; + * u64 addr; + * u32 len; + * u16 ksym_type; + * u16 flags; + * char name[]; + * struct sample_id sample_id; + * }; + */ + PERF_RECORD_KSYMBOL = 17, + PERF_RECORD_MAX, /* non-ABI */ }; +enum perf_record_ksymbol_type { + PERF_RECORD_KSYMBOL_TYPE_UNKNOWN = 0, + PERF_RECORD_KSYMBOL_TYPE_BPF = 1, + PERF_RECORD_KSYMBOL_TYPE_MAX /* non-ABI */ +}; + +#define PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER (1 << 0) + #define PERF_MAX_STACK_DEPTH 127 #define PERF_MAX_CONTEXTS_PER_STACK 8 -- 2.17.1