Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1223201pxu; Mon, 23 Nov 2020 15:09:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMeOW6rxEwD952KcxkWhMh3DxrfInMFEC4I9hAl5lOXQCVzZyX4Dy0mhPX/JgPqX2JR6gr X-Received: by 2002:a17:906:831a:: with SMTP id j26mr1777287ejx.450.1606172941935; Mon, 23 Nov 2020 15:09:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606172941; cv=none; d=google.com; s=arc-20160816; b=rFsnDGKJIa0W2aHv/ELefOibZxQ7+ucPh/fiPgn8LhSI3IQPLtFM1nko8aB+CiY4Cn esf4shBo9xmy+Kad6uNtlRtigZFQF1WxrTXeHo02ISy10M5u0/CE8ffjwz+EX3AVSFI6 8wPOM7FAJxvg7gj6njixOLN/kaYyPTaP/u7cfLioi6MQnFZFXbxEQSOGKOEsXH7o3ylR gEsiiTa7LnzaM+nLB/L+/s+sKyUKVxhsqngYjnBSyt5GIzavmcvj6SXsfIzwX6GlMoQh YOs7Ufiox/m4QXqtpeybE2N1Nam+9ddg1C3LORdlBIaBgoZYhfHhUUeIW4kkj4D/9+gm PDFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=1HkbTN//Jl+UO9OJCB122bR75pUENhdtLrsFETr/uRI=; b=0kjFKifMwg/KMSWvqZjtY8Jy8l0hCfddhWsKDwKDh1n9dLPjhv85F6tUa8JKnbYpJn lzANh4VNv6teysxDU4GsHO99LdCyBIqf5zpmG7E3jQXijtaJYya+gC+58qe8hVi6/pvo p3G7yYkN48WdyxzbB2Gr78YYN8/fiMf13/2B0k5yzk53zQrtqOTa6lxSs/YoR6kjTY05 FXHH6GJ7S+TQ7pDIhGv31R6W+mM7mBeLjDMHCwP4ob4CB4wNXEZnbtY+WPV9Qv4W1/59 oV2mrTpQLnZkIt42CH1CEi55zFQvoAXK07kyQFCIQTay/Rn7b4na1OWIb/IOZeZVizHj AqQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g5si5724741ejx.640.2020.11.23.15.08.38; Mon, 23 Nov 2020 15:09:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387461AbgKWXFr convert rfc822-to-8bit (ORCPT + 99 others); Mon, 23 Nov 2020 18:05:47 -0500 Received: from us-smtp-delivery-44.mimecast.com ([205.139.111.44]:60558 "EHLO us-smtp-delivery-44.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732902AbgKWXFq (ORCPT ); Mon, 23 Nov 2020 18:05:46 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-314-OtPJqGGDOnGBw3bhWNbgAA-1; Mon, 23 Nov 2020 18:05:38 -0500 X-MC-Unique: OtPJqGGDOnGBw3bhWNbgAA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6AA10100A254; Mon, 23 Nov 2020 23:05:36 +0000 (UTC) Received: from krava.redhat.com (unknown [10.40.195.242]) by smtp.corp.redhat.com (Postfix) with ESMTP id 807685D9CA; Mon, 23 Nov 2020 23:05:32 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Peter Zijlstra , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Michael Petlan , Song Liu , Ian Rogers , Stephane Eranian , Alexey Budankov , Andi Kleen , Adrian Hunter Subject: [PATCH 04/25] tools headers uapi: Sync tools/include/uapi/linux/perf_event.h Date: Tue, 24 Nov 2020 00:04:51 +0100 Message-Id: <20201123230512.2097312-5-jolsa@kernel.org> In-Reply-To: <20201123230512.2097312-1-jolsa@kernel.org> References: <20201123230512.2097312-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jolsa@kernel.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: kernel.org Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset=WINDOWS-1252 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Syncing tools's uapi with mmap2 build id data changes. Signed-off-by: Jiri Olsa --- tools/include/uapi/linux/perf_event.h | 42 +++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h index b95d3c485d27..45a216bea048 100644 --- a/tools/include/uapi/linux/perf_event.h +++ b/tools/include/uapi/linux/perf_event.h @@ -384,7 +384,8 @@ struct perf_event_attr { aux_output : 1, /* generate AUX records instead of events */ cgroup : 1, /* include cgroup events */ text_poke : 1, /* include text poke events */ - __reserved_1 : 30; + build_id : 1, /* use build id in mmap2 events */ + __reserved_1 : 29; union { __u32 wakeup_events; /* wakeup every n events */ @@ -657,6 +658,22 @@ struct perf_event_mmap_page { __u64 aux_size; }; +/* + * The current state of perf_event_header::misc bits usage: + * ('|' used bit, '-' unused bit) + * + * 012 CDEF + * |||---------|||| + * + * Where: + * 0-2 CPUMODE_MASK + * + * C PROC_MAP_PARSE_TIMEOUT + * D MMAP_DATA / COMM_EXEC / FORK_EXEC / SWITCH_OUT + * E MMAP_BUILD_ID / EXACT_IP / SCHED_OUT_PREEMPT + * F (reserved) + */ + #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) #define PERF_RECORD_MISC_KERNEL (1 << 0) @@ -688,6 +705,7 @@ struct perf_event_mmap_page { * * PERF_RECORD_MISC_EXACT_IP - PERF_RECORD_SAMPLE of precise events * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT - PERF_RECORD_SWITCH* events + * PERF_RECORD_MISC_MMAP_BUILD_ID - PERF_RECORD_MMAP2 event * * * PERF_RECORD_MISC_EXACT_IP: @@ -697,9 +715,13 @@ struct perf_event_mmap_page { * * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT: * Indicates that thread was preempted in TASK_RUNNING state. + * + * PERF_RECORD_MISC_MMAP_BUILD_ID: + * Indicates that mmap2 event carries build id data. */ #define PERF_RECORD_MISC_EXACT_IP (1 << 14) #define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT (1 << 14) +#define PERF_RECORD_MISC_MMAP_BUILD_ID (1 << 14) /* * Reserve the last bit to indicate some extended misc field */ @@ -911,10 +933,20 @@ enum perf_event_type { * u64 addr; * u64 len; * u64 pgoff; - * u32 maj; - * u32 min; - * u64 ino; - * u64 ino_generation; + * union { + * struct { + * u32 maj; + * u32 min; + * u64 ino; + * u64 ino_generation; + * }; + * struct { + * u8 build_id_size; + * u8 __reserved_1; + * u16 __reserved_2; + * u8 build_id[20]; + * }; + * }; * u32 prot, flags; * char filename[]; * struct sample_id sample_id; -- 2.26.2