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=1796419012; b=sC7mVTKY9/+cAJS4+rBGpS6QSQYZQXlBBzT+o4S4wED7PuoKBas/2mx5t7L7A7dRTUQ0 YgX1+bOKud5mj+8t8EN9Ji3UrKBGQb7iRek4CwBLFfFOc49+iUZuHeERZGGBaL6dUD1Kp xQ5GV27VXsy56SqgfdGoTxFnZj0lYPPdsOtHRohLNSiMtC2Dyn1gS9tdnB8JpqSxxtVnY y8UVPBwm6chcZydcTM/Z+N9esFf71sgpY8VJM6FYVV5wiD1yUgerrb+R+Gb2MsvvZhFwR BeEG3lXotiwaLKTA+XSycrWxCHKQEpwHOaEyZ5RqF5b7OV5a4amN0JoI0pwVgdDLoMg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796419012; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=aPh2aFXIsSf7oyquktYEgIUpIle+3kEtXFD258haAYs=; b=YSa7uTtHz3qEVVeGINL495g8AIlDA4XyvCAponSHNMwc7HFqfxT6wjseV5fWbmOB6r5Q bK6Vp1HXxi8qPbOJ25y2/cljwtnP/0MIebcayyUp7lG/BoTOfqjx74wVZxXsihBV2WX0U pef9W56pca9gC9O9tWq0tqwMOi8Mbp+5TI/lMU5GBD7gDCOqZIE5s13i8eoYRBWkE7YB3 kf0dD8WX9hoe9jOhMMuYFPFVbcD2Y38b8o+ASY1cYv5dNjjLbnBP4zugmgRvSsUaZu8eS Vph9R9wY09u8FzXNntuVUrGIl02t6P7qLywaU5hu36VeukJWOBQ9zxL1SOpKtDkMLTQ== 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=Z4gJO5fQ; 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 95A44606A693 for ; Fri, 4 Dec 2026 21:16:51 +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=Z4gJO5fQ Received: by smtp.kernel.org (Postfix) with ESMTPSA id B44301F00936; Fri, 4 Dec 2026 21:16:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796419011; bh=aPh2aFXIsSf7oyquktYEgIUpIle+3kEtXFD258haAYs=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=Z4gJO5fQyrzV8Xy257XGVjc3Vq+egANvceETk48IbHgn9O+AqL4MrcbhAVv3Q+Nlz yuMkMGxMribYXSHsPXRlqEdNbO7f0qcSV8wTex7PVvA7dYnskYT00wIJdHWTOrJqN6 R7uzx8HUg5en2RCRuJioRHMiYqJVFw3T7RYmPS7I0tF1jI2E/uTcIiUk3nh/KSEvrm 4KFGout14RDJ18168HggNjqTpxukTdgmAZq3KDvDfO3soYnonRXYbh8LnaoGVFA0BG OWJFJJocZu2iLKrqyCXg3zO/bix7Oyy0xKJAt1+GTVWSnpVmc0WmIAnWKznmiF++bw 3wE7TSdEwsoJA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v4 7/7] perf test: Add test comparing PROCMAP_QUERY and /proc/pid/maps synthesis Reply-To: sashiko-reviews@lists.linux.dev To: "Ian Rogers" , linux-perf-users@vger.kernel.org In-Reply-To: <20261204205854.3973609-8-irogers@google.com> References: <20261204205854.3973609-1-irogers@google.com> <20261204205854.3973609-8-irogers@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 21:16:51 +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: - [Low] perf test: synthesize() repeats kernel map creation via machine__new_host() -- commit 70b9ba90450d60910ea0fb4eb9c493ae0b385cd3 Author: Ian Rogers perf test: Add test comparing PROCMAP_QUERY and /proc/pid/maps synthesis This commit adds a perf test that synthesizes MMAP2 events for the test process using both /proc//maps and the PROCMAP_QUERY ioctl and checks that the resulting events match byte for byte. > diff --git a/tools/perf/tests/synthesize-mmap.c b/tools/perf/tests/synthe= size-mmap.c > new file mode 100644 > index 0000000000000..514856ed6abee > --- /dev/null > +++ b/tools/perf/tests/synthesize-mmap.c [ ... ] > +static int synthesize(struct synth_events *se, bool procmap_query, bool = mmap_data, > + int fill) > +{ > + bool saved_procmap_query =3D synthesize_procmap_query; > + struct perf_env host_env; > + struct machine *machine; > + union perf_event *event; > + int err =3D -1; > + > + perf_tool__init(&se->tool, /*ordered_events=3D*/false); > + /* Use a new machine so DSO build ID caches aren't shared. */ > + perf_env__init(&host_env); > + machine =3D machine__new_host(&host_env); [Severity: Low] Does synthesize() need machine__new_host() here? test__synthesize_procmap_query() calls synthesize() 8 times, and each machine__new_host() call runs machine__create_kernel_maps(). That parses /proc/modules, recursively walks /lib/modules//, and scans /proc/kallsyms on every run, even though kernel maps are never used here. Initializing a local struct machine with machine__init(&machine, "", HOST_KERNEL_ID) and cleaning up with machine__exit(&machine) avoids all 8 kernel-map setups and the host_env initialization. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204205854.3973= 609-1-irogers@google.com?part=3D7