Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4229030pxb; Tue, 10 Nov 2020 10:57:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGBih+Hg1xXfAHuuCBlPNImiwwmbnJYE8iXsp3047LZmgGruLYkff6fkVlXN3kG07JxetP X-Received: by 2002:a17:906:b01:: with SMTP id u1mr17282184ejg.427.1605034675327; Tue, 10 Nov 2020 10:57:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605034675; cv=none; d=google.com; s=arc-20160816; b=z1ZZMnKM6qovDdS2YS5BfeIArI+jhq2eX2N+hhe0Qb3KS7I0ci3Jtg5FtABEFI9w5l VqvSjKvCWBScHH4yD75EpzZ2FcSWmXpnJBwnrVK9FC/WuEob59LVIg/Hi1XHfoifTDtD ZUt22TkL6S9InAQYl+Uf50lp8r8Q19SwdtltYy1HrbeCpAt61kbK/AQq19U9HkM2eRzY VB3lCnm38QHf865iveT301CrWLzn1X9sZGM1P4VawhnQ3cMrRBZm5fS/Y3a6y8s0yae+ 6C3Nt1n4Dn7j3gFEwaC2qYlnVTJqPP+6o1p4eSzNj/OhQRkA10MhkwpY83Fe9LHo76hl 7qyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2nIuZVEYB5kCCm6qw0PXDsnwl3YBd5Q7V5DoXWSL8Cc=; b=EgUASH62fTgfz1yXWAMr8hYbYWlmaZZpjNySe4rTRRFiZzV4OFcI2PWBD39s8/ygpE fLSijfKOtjr+QBw4qwh69BMJ+Y2wnOaKtaZ8uFLm8hKA0qyp8HdLAIiRStY3uJus1/dh koxg5qj2PWOcZUJgOcD5E5VfSErjcgsZGnDIsRRwkw3a1OZquJ3fCXDYnoaFdOvUOf+P RDUlOp/WeuoVimOZloq/x6uA6883t0QyMv3zcUpMr2vCgsqqugnZhNT3rUwTFBD1K8rD otLr2+U+sC3GD49O70pOMvw1FmZw1pgXSdxcrmn92SVbluPhj69gOfvVLaSWgUC0o1Cq JFeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pyeasDgM; 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 cd26si9228516ejb.746.2020.11.10.10.57.28; Tue, 10 Nov 2020 10:57:55 -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; dkim=pass header.i=@kernel.org header.s=default header.b=pyeasDgM; 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 S1731085AbgKJSzJ (ORCPT + 99 others); Tue, 10 Nov 2020 13:55:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:44666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730468AbgKJSzJ (ORCPT ); Tue, 10 Nov 2020 13:55:09 -0500 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 25A27206F1; Tue, 10 Nov 2020 18:55:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605034508; bh=jGMJQVhOYYbu7V3KA7lkuZA03vlDOae9KFulBxXATsE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pyeasDgMpFMhwi4L4dxPrzhjp+0Yom/pzkyA7ZyoXSWyRGQIWX/ldDCQFi2fHVXBI XyDjKj/7sETDCEAbCDVhD/lOkHtfgcHj+H19C0YE5UlY5DiT3zT7Y+vAZOoEI1AM7f 5INt1AT7gAK2y5iWgwTcIPhBasJ3/FByhoMnisUM= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 20B8D411D1; Tue, 10 Nov 2020 15:55:06 -0300 (-03) Date: Tue, 10 Nov 2020 15:55:06 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Peter Zijlstra , Jiri Olsa , lkml , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Michael Petlan , Song Liu , Ian Rogers , Stephane Eranian , Alexey Budankov , Andi Kleen , Adrian Hunter Subject: Re: [PATCH 03/24] perf: Add build id data in mmap2 event Message-ID: <20201110185506.GB26034@kernel.org> References: <20201109215415.400153-1-jolsa@kernel.org> <20201109215415.400153-4-jolsa@kernel.org> <20201110082851.GV2594@hirez.programming.kicks-ass.net> <20201110101041.GC387652@krava> <20201110182334.GG387652@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201110182334.GG387652@krava> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Nov 10, 2020 at 07:23:34PM +0100, Jiri Olsa escreveu: > On Tue, Nov 10, 2020 at 11:10:46AM +0100, Jiri Olsa wrote: > > On Tue, Nov 10, 2020 at 09:28:51AM +0100, Peter Zijlstra wrote: > > > On Mon, Nov 09, 2020 at 10:53:54PM +0100, Jiri Olsa wrote: > > > > There's new misc bit for mmap2 to signal there's build > > > > id data in it: > > > > > > > > #define PERF_RECORD_MISC_BUILD_ID (1 << 14) > > > > > > PERF_RECORD_MISC_MMAP_BUILD_ID would be consistent with the existing > > > PERF_RECORD_MISC_MMAP_DATA naming. Agreed. > > ok > > > > > > Also, AFAICT there's still a bunch of unused bits in misc. > > > > > > 012 CDEF > > > |||---------|||| > > > > > > Where: > > > 0-2 CPUMODE_MASK > > > > > > C PROC_MAP_PARSE_TIMEOUT > > > D MMAP_DATA / COMM_EXEC / FORK_EXEC / SWITCH_OUT > > > E EXACT_IP / SCHED_OUT_PREEMPT > > > F (reserved) > > > > > > Maybe we should put in a comment to keep track of the hole ? > > > > ook > > how about the change below.. I also switch the build_id with the size, > but I kept the build_id size 20, because I think there's bigger chance > we will use those reserved bytes for something, than that we will need > those extra 3 bytes in build_id array > > struct { > u8 build_id_size; > u8 __reserved_1; > u16 __reserved_2; > u8 build_id[20]; > }; For "maybe we'll use it for something else" doesn't require that it gets before build_id, i.e. to use it for something else it can be as above or struct { u8 build_id_size; u8 build_id[20]; u8 __reserved_1; u16 __reserved_2; }; that groups build_id size with it, but nah, this is getting funny by now. My suggestion was not about increasing build_id to 23, just to leave the unused (reserved) bytes after it. - Arnaldo