Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp459644pxb; Wed, 11 Nov 2020 07:56:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJySNEYhBOmazy4ZxgkTFUOvCWi3CndAl0AWy4RI9jNQ4pOyyQdiCZedyDqT9+Xwjcb76PUN X-Received: by 2002:a17:906:fa1b:: with SMTP id lo27mr25393599ejb.216.1605110187796; Wed, 11 Nov 2020 07:56:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605110187; cv=none; d=google.com; s=arc-20160816; b=rNSzeDMtee4F9nXTZhhbS72BS5Rnxrca/QHMuD49iFAjeYzK+B4Pk0e3s8ZaIoxD+8 M1LBgYgkOtIKQ72fdbCnUCvQIcjhBildZBG9RCdbHdByl+s/z9P+kx0WJ+Di88JfTULg zPjgyc3lD0Xe1Rq124URlxc5FbBMxBN1p1dyHOObKP+/wMetarmnmvXtDckWJj6SfvHZ AX1AyKV1GMsQlmnVtNlh4EwYg7WNNx41Bi9rhBaIhNSnTR2KWZ3vHFWSTS5usa7Xhfht IREc2oKFEiCxAFue2FxBZHfLaepKSCyBFS1UewJCkmmdIvMbE3wL0BL9BcTRxr2vJgcy pxnw== 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=hvDVTWmRbbuIvkOWsqIftQDiojJWKzlEuRre0QQ1HiA=; b=L3lq7x8xsv1DCyjdy6thL19refRxFIEwLk7NOjr0URtIPItnsK7ZbhaJPSbOrWxIr8 oyleiXTFwMFgewmHRhiPbJqhEvYM+ydO8FkWQowzdlEFn2SgfdvluoT8OR/3ErAC2xWs sqM+KS4+EkDpk8JNQKf61NXyEdCKdXZ4Ax7w9M0kwYcv5fboDgfghIOEz6wJ+mmtH6f/ aJx3bmUT3Mf6zVk2dEUKMRdTaa46sXIBA65xUgTdnYJ2q6LHnWSWwUZouLfUw2oiGkFT IHPkvovKy4oBhsyuUGUtvnwxW4Nt0AvBlbrlgPvyvh0OB1Yl1pt69bbW0Ptlox3XjYRK ncaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=G0nMY9E8; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qq25si1544581ejb.546.2020.11.11.07.56.04; Wed, 11 Nov 2020 07:56:27 -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=@redhat.com header.s=mimecast20190719 header.b=G0nMY9E8; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727254AbgKKPy1 (ORCPT + 99 others); Wed, 11 Nov 2020 10:54:27 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:44624 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726274AbgKKPyY (ORCPT ); Wed, 11 Nov 2020 10:54:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605110062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hvDVTWmRbbuIvkOWsqIftQDiojJWKzlEuRre0QQ1HiA=; b=G0nMY9E83Z/80hBmA0CNeRR+8eAL0ns1M6T4iklOH+WgL7C/+ld3w5r7BJbd/YqNZrAMNf VlbvTs98TVMkNaBBldmlOK3obNwKtI6BIR2SeelkRYjEBZukkXob/DxVYBQ/vLmBLzkOhW RPlMGUstWa7uiLg+VzRQmfajL9/zzTw= 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-474-eouMY3QkOUaK8zKyZWORXA-1; Wed, 11 Nov 2020 10:54:18 -0500 X-MC-Unique: eouMY3QkOUaK8zKyZWORXA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 49D7A107B277; Wed, 11 Nov 2020 15:54:16 +0000 (UTC) Received: from krava (unknown [10.40.194.237]) by smtp.corp.redhat.com (Postfix) with SMTP id 1D04C2C31E; Wed, 11 Nov 2020 15:54:12 +0000 (UTC) Date: Wed, 11 Nov 2020 16:54:11 +0100 From: Jiri Olsa To: Arnaldo Carvalho de Melo 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: <20201111155411.GA581954@krava> 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> <20201110185506.GB26034@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201110185506.GB26034@kernel.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 10, 2020 at 03:55:06PM -0300, Arnaldo Carvalho de Melo wrote: > 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. yep, that's why I kept it like above > > My suggestion was not about increasing build_id to 23, just to leave the > unused (reserved) bytes after it. ok, thanks jirka