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=1796207621; b=S3VlBFRmhyrrDVpJZhaRUEVeBr7vK598Zt1rRnUj0xyn86CrgajvKHddowO7KTeiVe3X B7KsOBecc4hsgJxaneDQOnQ5xgWQA/pcRlBnkRLEdj5ani7bOQyOqRyGu6JFk34e9JqOV WG/YMslILjf2FaZ/lvIf6xTedhBpmyeXmy6m220jPpqfLvMHkNTHBWX5hP1VQpZGtQK/B R5+f4avfPdcxuiJhpdmrbC9oVm1Ele8hDgiuIqsnwPPYFrd//LsttNAWfOphcDY9MRIok OxRI7o32n0a4EJxJspHgy4bkGmXice21FR8L26fX0BdbYfU+4QlCFbuV8lhd/Kggqdw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796207621; 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=6sN+wBudeHMhp7jJZe0WGf6Wl2yCN5YefxBoIxTs7JA=; b=ftVMUkcT8yo5K/d1HYi1lJBmtQ3wp3As2NoOQkBT2mjPVlnOxuqZfpnIJpHrpieF2lcr ISq7ZA/V9g7tweXOKHs/be8I8G288HxfsxWj0psgNga6wPXoA4NzE3MmwuYFw8dFU89+j VpmkS/g6JtxFlcwAKUnDvR1UXkFGgjrhe72HDiYj6mG9fOehyynbhp+LbDPokrqA1nZ8p +KCQyrq/qcj1nNmy5GBiLX7/qqfSo/8QzSqlOqeTyqKJwer7ijNgDDhCTvRKjKvsAyVMz cSSSxx5GlTw+5JcwrbRguDFMCmx3lqEpdzhwEVwGrL+gb5UaEgakpI0z/6Q3P/M/5/g== 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=njv0LoG5; 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 244D5606A31A; Wed, 2 Dec 2026 10:33:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 244D5606A31A 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=njv0LoG5 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=6sN+wBudeHMhp7jJZe0WGf6Wl2yCN5YefxBoIxTs7JA=; b=njv0LoG5WV1Oob1SIV1BXB+Sq1 opo8Rc2Yw5FlI777MG9PtIVdwsmfHhijFpFqcCGrtlTVexOyteVuZyIerREbQ9Gl6eAr/S8dEWqD0 HAcGx5LNiGwqxkhtOXycNY6qiRiPiFQTWYEgabD/KVomgxvfj4YkGEiDnG3WpGVhuoaG/jFPlreKQ U0xxLMVSjl8Fv8quVj7FyRTUwJ9EIeAOEATmAU+o/W/Jj0+NTOv9mL+nXL429i0rex6/5JUnWnZZs 5CgAukK0RU4TsCamoRYBXtbs/341y+cBi1ackqVvuAVvY0g/6oo+t3iK3mHlkCT3bn/HEr6+Bx9Nr g9JXW6yw==; 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 1xYheS-0000000CATB-3Ylp; Wed, 02 Dec 2026 10:33:29 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 7C460300428; Wed, 02 Dec 2026 11:33:27 +0100 (CET) Date: Wed, 2 Dec 2026 11:33:27 +0100 From: Peter Zijlstra To: Ian Rogers Cc: Namhyung Kim , 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: <20261202103327.GG2883950@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> <20261130193846.3582553-1-irogers@google.com> <20261201081435.GD2883950@noisy.programming.kicks-ass.net> X-Mailing-List: linux-kernel@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 Tue, Dec 01, 2026 at 09:10:49AM -0800, Ian Rogers wrote: > > > Which aspect is the main objection here -- the 8-bit/56-bit packing, > > > the per-sample deduplication in the kernel, or repeating build IDs per > > > sample instead of a sideband mapping? > > > > Like I just replied; I don't see why we need it at all; we already have > > buildid in the mmap sideband data. That is sufficient to reconstruct at > > post processing. > > The point of having build ID + offset in samples is to avoid needing > MMAP2 sideband and /proc synthesis altogether -- with a symbol server / > debuginfod, samples carry everything needed to symbolize without > tracking every process's address space. > > Relying on MMAP2 sideband only gives new mappings; for system-wide > profiling, perf still has to crawl /proc//maps for every existing > task at startup and record every subsequent mmap/fork across the > machine, even for processes that are never sampled. On large > consolidated servers that overhead is substantial: > > - For infrequent system-wide events (e.g. bus lock), synthesizing and > recording all system-wide mmaps dwarfs the cost and size of the > actual samples. > - Even for high-frequency events like cycles, on a large server with > lots of consolidated work we see over half of perf.data consisting of > mmap events, and that share keeps growing as more work (including > guest VMs / containers) is consolidated onto larger machines. > - On a loaded machine, just allocating the procfs inodes to scan > /proc//maps at perf startup can trigger memory reclaim and > latency spikes -- worst when you are profiling a machine because it > is already under stress. > > So build ID + offset samples make sense today for infrequent > system-wide events (like bus lock) and for profiling machines under > stress without an upfront synthesis storm (reusing the kernel's > existing stack_map_get_build_id_offset() helper via defer_callchain). > > Longer term, for general profiling this also lets us optimize sideband > overhead by running two events -- one with build ID + offset and one > with raw virtual addresses -- starting with build-ID samples while > lazily synthesizing mappings in the background, then switching over to > compact virtual-address samples once mappings are ready. > > Given those use cases, is your objection specifically to the packed > table encoding in v4 (where a simpler UAPI layout could work), or to > having build-ID + offset samples in perf at all? Bah. So realistically buildid *never* changes vs the frequency of samples. Adding buildid into samples is utterly insane from that perspective. Additionally, the whole buildid thing is an utter shitshow when trying to do it from sample context. So I really don't want buildid from sample context. It doesn't make sense on so many levels. I would much rather invest in better means of doing that initial setup. Eg. would it help to have UNMAP events for executable mappings (that contain the buildid of what was)?