Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp672216pxk; Wed, 16 Sep 2020 14:02:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1Ya2r4+tszri9sPrY/hYcsyBmBfNRZY9cX+xFtQyAn3f1uJGJhwgkjQUv4phTRG6V1ivs X-Received: by 2002:a17:906:bcfc:: with SMTP id op28mr21672545ejb.248.1600290140367; Wed, 16 Sep 2020 14:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600290140; cv=none; d=google.com; s=arc-20160816; b=WOnngcqDCXNw+fiuQ7Z5r3X2od8diz5MfB3+48ErMh2I+/V1OjgJr3gfHwXzmqPw0w oXSZQNw2HzGR9xhNEszBjZnmFwj7OdeoEjg3CVRNhg62PFLaQ8GW6iUN2MdyfcTw3GtR kmZ4gulGIYNkFH9YhOgR3f3BpQLMLANzJ4W1uEVUMaxK7l43IAHmkddpl3RR/uomCxcF bjTH3ex7eO5xLU+eQVzlhP4hCVq4q3ecT5n7UPZWOyYlJwFQGz6zpHJUYRH7rrm4IZzz eHvskmIjGCw1H+M0au94f0aemoqji4b5wvpcl0UENxobMw9AxNcUnX1zxKS9M2Lg/vhQ uoLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=aBLuIgyk2jksf4+dnix+8e4H/Fbp0N3EtJwkDFkDs80=; b=IdImpU70ecHND1Kg3AWpwwjzmsiYe29rM9RHxKz6Ml/H/kGEUaBZWCrU7ZfYAdcTLv LzSXp90zkiEC1EzSh0cbiDwcLjvrX4wK1MywM8JWsJv6qFMcNXmzua4XDKY5Lov4AqND bRGz+2SH8Af33QxHuPjIvgq+ZDGoXkjEN2saygKaAJP5H+F06VSMG/sH4upI7fOKx0v5 A974ClrwYOfGnkqQljrLRk5yEuVl+8SWqX92gWLHPXKf5Ug4oYqBIq/jwCnfQNVy4vKY f3+f9LJweXsFDO31chOX6wXjY7nMYmamd0rapTRd+80voH0gQmod60hALrPMojgmR3L6 fZVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yYHsivDV; 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 b23si12392384eje.20.2020.09.16.14.01.55; Wed, 16 Sep 2020 14:02:20 -0700 (PDT) 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=yYHsivDV; 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 S1728481AbgIPU6T (ORCPT + 99 others); Wed, 16 Sep 2020 16:58:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:44498 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726538AbgIPQdP (ORCPT ); Wed, 16 Sep 2020 12:33:15 -0400 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 151CC22288; Wed, 16 Sep 2020 15:42:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600270962; bh=AnwlNmtnOynVuh2z7BTPG/HzLHmCwkA8RYapHph0iKo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=yYHsivDVhiM9Ai44rki7DnkAeYAvcS4RSXKbhNS2d2zNis4SBaaE/4lPMMgyxid0f adx/DMBOAqSqz3jJ3VEvDH1XlPEiLZYAiKhLCFNC+JLaHmxNDxYrjBibovURc7d0lq rgOfnBXUllBjmUUHmeYWRzQWquC549Of+auteO5A= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 6BA1F400E9; Wed, 16 Sep 2020 12:42:39 -0300 (-03) Date: Wed, 16 Sep 2020 12:42:39 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: peterz@infradead.org, Ian Rogers , Jiri Olsa , lkml , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Michael Petlan , Song Liu , "Frank Ch. Eigler" , Stephane Eranian , Alexey Budankov , Andi Kleen , Adrian Hunter Subject: Re: [PATCH 16/26] perf tools: Synthesize modules with mmap3 Message-ID: <20200916154239.GT720847@kernel.org> References: <20200913210313.1985612-1-jolsa@kernel.org> <20200913210313.1985612-17-jolsa@kernel.org> <20200914160758.GK160517@kernel.org> <20200916082018.GA2301783@krava> <20200916140744.GR720847@kernel.org> <20200916141700.GC1362448@hirez.programming.kicks-ass.net> <20200916151021.GS720847@kernel.org> <20200916152123.GH2301783@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200916152123.GH2301783@krava> X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Sep 16, 2020 at 05:21:23PM +0200, Jiri Olsa escreveu: > On Wed, Sep 16, 2020 at 12:10:21PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Wed, Sep 16, 2020 at 04:17:00PM +0200, peterz@infradead.org escreveu: > > > On Wed, Sep 16, 2020 at 11:07:44AM -0300, Arnaldo Carvalho de Melo wrote: > > > > Em Wed, Sep 16, 2020 at 10:20:18AM +0200, Jiri Olsa escreveu: > > > > > > IIRC BUILD_ID_SIZE is 20 bytes which is the correct size for SHA-1. A > > > > > > build ID may be 128-bits (16 bytes) if md5 or uuid hashes are used. > > > > > > Should this test just be "> 0" ? > > > > > ah right, will check on that > > > > And how do you deal with this in the kernel? I.e. to inform userspace, > > > > via the PERF_RECORD_MMAP3 (or MMAP2 with that misc bit trick) the size > > > > of the build-id? > > > The union size is 24 bytes, so there's plenty space to store a length > > > field with the buildid. > > So, I think we should instead use a bit in the misc field, stating the > > kind of build-id, so that we don't waste a byte for that, I think. > not sure there's too many misc bits left if there would be more > build id kinds So, Ian mentioned a few types of build ids, if there are not that many misc bits left for PERF_RECORD_MMAP2, then yeah, we can then use one byte and use it as a PERF_RECORD_MMAP2 specific misc bits, me may want to have something else in the future, like we're now reusing those ino, etc, to instead store a build-id. But we're closing in to a final solution, and that is good. :-) - Arnaldo