From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796366798; b=J4guIVkmscAZ/IQC8SERe2RiOLNrLgQLzSTpAfmuZWqvRM9CYhgn9orTtr1RW8Ii4cre 1YoMoD4r4lBAvFpGTqZSbQCUGuzkTRVCHQRJRrHXW08c6vjJomtJoYiJewD/BO9Syc3Tg N5BNGZScDupL9TmOWnSUlbncyP1FDgWwufu0SZywNBssPDL2OJOsrH14cVJYV+kkLkt+Y ur+kcnlX4xOxQER27sdMaBLk3PjYzwHOvf0i5wAi5hGrr327FkuP3bDC2K+F7W2usZXff sjVbu6QeDi6EW4Skw71T4CDUCnOw8/fJLmB8FL9+NJ4VDgo1+/hgPa7ark5iVP1JWGA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796366798; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=ZX8VCeBqoPMHiTZmcaoixY9SvxWf5Dsv1g6m1c6R6h4=; b=C1N+KKlbOKSOWJa9k4a2EOdZPIE0Jrj/VxNeZOe+aB8XXBFt281MrBLW8sm5ytDZptz7 Sq5MGrASI+eRGBz0DZd13JwoqKfFlLeeo5NHI3GT2Yj+C1ps9wsvigpszU+E5bl019KF5 qJpOUDGUPS+0fl3T71/wc0gpFINhXR5LaaSiPWZ2k5ILkOvTl+Kvno9ROO4BkXkJQhflR stheNXrYpr2UgUqPmQlyOU28Heay4qGx+Ni6HTKBBR/Sn/Ni+wdlEY6L/OTl5RY+YVC+1 nzwg3CemL4NBIaxb+thBatP41Y7p9FqPPKICTdtbGu0rUWLKV90M6OSFZ2f/a63lrpA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TB0XhehY; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D587B606A32C for ; Fri, 4 Dec 2026 06:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TB0XhehY Received: by smtp.kernel.org (Postfix) with ESMTPSA id 555381F000C2; Fri, 4 Dec 2026 06:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796366798; bh=ZX8VCeBqoPMHiTZmcaoixY9SvxWf5Dsv1g6m1c6R6h4=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=TB0XhehYDUxbf3sNsTOHLedKAPHCuXhE6BA+i11yjxEBuMi+lf3JIJUKFCWwAgno2 e9woZ2juwmm20uI+0vxIyvtR0w14V00njzO4XqFiK1xUKijO+RNuPJhNm6waeeZkJ/ w+cPhmT64S8ebjVjPN9YcKKRsx9yyXeGfHS5rCV5xs5qxG2um1UR9W6DX8N22jMFiJ TIlM3bB964lOluNgeTdVXD/Bgwj3p53nw2scCcrPRRfCnCKRFszRUm2pai4d70t7Hm vIiSzKTuMVM865ixdhH0VAWLZNx1a0cYsqUBeEaRZ6XiDmuCD3GGJTPHbgeoI8yWSF tWDf3jtHmk/Uw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 5/7] perf synthetic-events: Use PROCMAP_QUERY to synthesize mmap events Reply-To: sashiko-reviews@lists.linux.dev To: "Ian Rogers" , linux-perf-users@vger.kernel.org In-Reply-To: <20261204062328.2508164-6-irogers@google.com> References: <20261204062328.2508164-1-irogers@google.com> <20261204062328.2508164-6-irogers@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 06:46:37 +0000 X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] perf: PROCMAP_QUERY enabled on 6.11-6.18 without build ID or VMA locks -- commit 22c6077b6804349c8a83a045b52a96cac3269331 Author: Ian Rogers perf synthetic-events: Use PROCMAP_QUERY to synthesize mmap events This commit uses the PROCMAP_QUERY ioctl on /proc//task//maps to synthesize MMAP2 events and fetch kernel-provided build IDs on Linux 6.19+, falling back to reading the maps file as text when PROCMAP_QUERY is unavailable. Link: https://lore.kernel.org/lkml/20261202124341.GA677025@noisy.programmin= g.kicks-ass.net/ > diff --git a/tools/perf/util/synthetic-events.c b/tools/perf/util/synthet= ic-events.c > index 445199d7bbd46..fe2c36962d1d0 100644 > --- a/tools/perf/util/synthetic-events.c > +++ b/tools/perf/util/synthetic-events.c > @@ -498,134 +524,506 @@ static void perf_record_mmap2__read_build_id(stru= ct perf_record_mmap2 *event, [ ... ] > + if (procmap_query__supported()) > + rc =3D synth_mmap2_state__procmap_query(&state, fd); > + > + if (rc > 0) > + rc =3D synth_mmap2_state__read_maps_text(&state, fd, bf, sizeof(bf)); [Severity: Medium] Should synth_mmap2_state__procmap_query() be skipped when mmap_data is true on Linux 6.11-6.18? On those kernels, procmap_query__probe() leaves procmap_query_build_id_supported false, so data-mmap synthesis (such as perf record --call-graph dwarf) pays the per-VMA ioctl and two-pass scan cost with no build-ID speedup, regressing both warm and cold DSO caches. On Linux 6.17, PROCMAP_QUERY also regresses target mm->mmap_lock contention for both exec-only and data-mmap synthesis. Text /proc//maps uses per-VMA locks since 5631da56c9a8 ("fs/proc/task_mmu: read proc/pid/maps under per-vma lock"), whereas PROCMAP_QUERY gained them in 6.18 via d9d1c2d81797 ("fs/proc/task_mmu: execute PROCMAP_QUERY ioctl under per-vma locks"). Falling back to synth_mmap2_state__read_maps_text() when mmap_data is true without procmap_query_build_id_supported (and on Linux 6.17) would avoid these regressions while keeping the exec-only speedup on 6.11-6.16 and 6.18. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204062328.2508= 164-1-irogers@google.com?part=3D5