From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=90.155.92.199 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796112645; b=tGkPBf6hCm0CnZw3F64aKueINrU5QlIulkoGH3rBh1R2oZZbXwvPIgpmVIWn1YldgDAg 7WcG9kRnXvpVsKBOuHolaA2o5x/G/RnoWTdDptGWKi8RrXTy/VBwQfkLGkQvzDURw2VRM xDRyhvGLIjfF8LPk2aSM155NTG9Ue4tSinkHAgTw6MTMYcu8OOFs/cJF7Vb0F7rVMgDHI Slpdfld/Ig8YsQEYsvfgjbDGFMvnCqNDDZ20iZlbnBS3fL0SpR2Bxm1D3JQ99/tH7Jk0a mJLMW8XIMsVU/S5WB5lKzvXmMBbGTl8iMk1Kx6M4W+urwljxYSi3+NCQCiI7TJ9p11Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796112645; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=NHaoGVi5CA55rZV9uORMtiZrY3jLShHB8Aqr9a+a12w=; b=nk+8qeSsNiYyHJF1Sh0Ng/ntnzqb3XQTNJsa6XCMf46JYoskbvTxh+OkXExU7USVd7nE Y4/uFK2Njft+EZKyhrmVrwuJOcSj+Qsh72g5PG0DUt/GnBY6T7STVOBNvk3JUeKBetibh dhLfO4kzedJu21AipP+65Es27VZujxY7ASjHKLP/O83Rv64cE8SUvnHqyotugEEeU+zc1 eo8gsWv+wt0wmd9zxp3z0ZQ5stdAiT99y7QW9Y1TcNeEos6yQQsCIvmO34CtELKSREV0K LQOu8d3h52zJzg0xITHU/1QBiyvMPcQfqvnNIUgWjvbI4Rokt4KgA7w5ii0HZVaP2/Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=TKk4Itaf; arc=none smtp.remote-ip=90.155.92.199 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2A45606A31A; Tue, 1 Dec 2026 08:10:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C2A45606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=TKk4Itaf DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NHaoGVi5CA55rZV9uORMtiZrY3jLShHB8Aqr9a+a12w=; b=TKk4Itafl4V8KXWiboe5YzUvau riNtZr6n95Fkv0em9BvR4HsJ25q6RP+r/MFE/j5ymJSH6xvszCAR+k8F42KQLIumMsCLiAlzTQbZp nm39lr4IR32twRSa+Vc7lJdFgzGEa3oyahB1ZGzen/meqw4tAa6j4HcbEenWTIxWon1DwWEgL5eFD 1vPwyHemSI00GcjvTqFDqh4wV3Wm91L10D25SBP8FMGMis31mvsgYVY8TFlvxNJjLrhlmkTsEZpMd y6vAHWDWeiUEuK3ZvqSmJX8U96/8TQgC1bRY8JbIDCcwBTLDMm64+3wfbUSSgS1U4DrOP/cOg7eU7 UQ6z02Jg==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYIwT-0000000Am6x-0Yhu; Tue, 01 Dec 2026 08:10:26 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 8395E300359; Tue, 01 Dec 2026 09:10:23 +0100 (CET) Date: Tue, 1 Dec 2026 09:10:23 +0100 From: Peter Zijlstra To: Namhyung Kim Cc: Ian Rogers , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , James Clark , Athira Rajeev , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , Ihor Solodrai , Leo Yan , Dmitry Vyukov , "Steinar H . Gunderson" , Stephen Brennan , Thomas Falcon , linux-perf-users@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 03/19] perf/uapi: Add BUILD_ID_OFFSET sample types to UAPI Message-ID: <20261201081023.GC2883950@noisy.programming.kicks-ass.net> References: <20261125005108.1020003-1-irogers@google.com> <20261125005108.1020003-4-irogers@google.com> <20261125132512.GB2668804@noisy.programming.kicks-ass.net> X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Nov 25, 2026 at 01:45:32PM -0800, Namhyung Kim wrote: > Hi Peter, > > On Wed, Nov 25, 2026 at 02:25:12PM +0100, Peter Zijlstra wrote: > > On Tue, Nov 24, 2026 at 04:50:52PM -0800, Ian Rogers wrote: > > > Introduce PERF_SAMPLE_BUILD_ID_OFFSET and > > > PERF_SAMPLE_CALLCHAIN_BUILD_ID_OFFSET in enum perf_event_sample_format. > > > > > > For PERF_SAMPLE_CALLCHAIN_BUILD_ID_OFFSET (and > > > PERF_RECORD_CALLCHAIN_DEFERRED when PERF_RECORD_MISC_MMAP_BUILD_ID is > > > set), encode a deduplicated table of variable-length build IDs > > > (u32 nr_build_ids, u32 nr_offsets, followed by packed { u8 size; > > > u8 data[size]; } entries padded to 8-byte alignment) and an array of > > > 64-bit offsets whose top 8 bits encode the 1-based build ID index (or > > > 0x00 for unresolved user addresses and 0xff for kernel/context entries). > > > In common cases where multiple callchain frames belong to the same > > > binary, each unique build ID is encoded only once. > > > > Why ?!? This is insane > > This is basically to save space for callchains. When multiple entries > fall into the same binary, it can have a table of binaries/build-ids > and use indices instead of repeating full build-id for each entry. > > It'd be great if it could have a global (or per-session) table. This is > a per-sample table. Please let us know if you have a better idea. I'm most confused; not having build id crap at all saves even more space. Why do you need it in callchains? We already have it in the mmap data.