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=1796524087; b=LgEBNr14tji0pnyZ6WG9SbjbhKY6Yhms8yRXcun0r7A2vBCKBqt/HrfBp1P7k3R+1RVZ fNyJWlBL+LU1bxviHufSxEBg69YKz65OEBK4r9pGjVuDSTLvAIBO7dulKeC4BOu+uuP1w 7+ELqcyG6D2uNAlxrq5kHfXVade+Fi/iA8VbzluCPQQVJKMctoFUivT9sSTzspa6/wds7 X+FwPgioXnPZug5fNCQOGQbyhkAi+QI5m+DljKK7wHUU02iTi4sxBDaWxTP5ZBwU6/dvN ahbS5LS0znw5zR6KOcFBrXYyl/mFtG+xu2kUqwrKWwUIS2AaUnYfBTVfkEBVnU7Zt+g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796524087; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=tdQQrFgnSf6rXFGxPN2rsBlnOVOpDBQpoouaHwAtwKE=; b=SBhX6+iUKJFiHTsSff5PKrek9xRlMR5G9CKxWZ2dV4qKlXEDyNW6E1vvJEMO5nA6cejW VSaShS+j5A8DH/aQO6CdOGk37gLB1cuBju1g5s5s/BGGAsFdezno8FhEmNtDr78XBHade N3l+oSU8dqCJ6mD8b9RlWDFBNQ+ZSQxQdG6yXXsjVl/DFJ1RZ2MnYjhB+xEYqGtMV61E/ lBbDQMmsOlRgCK7PHDTofcUiEBaMWrlDYjq/hHG4zwXzxZxRxvuUJRCocZxRJkruLskDk wetPgY+r/Xj29Ui3TvVn71UDzH9H1PAlrihAos0AlB0AgWAyVyL+6YChRPQQvOKAOgA== 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=S5I5X+0Q; 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 9FE41606A31F for ; Sun, 6 Dec 2026 02:28:07 +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=S5I5X+0Q Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25BA61F0092B; Sun, 6 Dec 2026 02:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796524087; bh=tdQQrFgnSf6rXFGxPN2rsBlnOVOpDBQpoouaHwAtwKE=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=S5I5X+0QxE4LuuqNhBEjtGvYhJe8SvxlUBORbeNbEkcuVrOncilsOrijb0mVJL864 z5wZ/K21Jd7h7ymS1VFc4QjbmgV5lI0foO1gwQl044oQ2zIcgVAF1VBtldQggxp4h+ ZrrHKI/ElJNmRQLUD0q4l8i28VM3Pn3uiUjyMaSPuCp7AyIzunqT1uXeRj3zgS3bJq YUWD8+/8oPLO1uTpnYHo9B/+Ouw4+oMuBXUolEtt4NHlM65SFgw8a/GUYfKUBIlKUR /OwPVQ//U5diVKZ/S1yozrci90hSY9tjjB3T5ykLNJJnAhmE++7e301kkaSItFpja5 p7KEPy+Q89ZlA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 4/8] perf pmu-events: Batch metric generation and scope via mapfile.csv Reply-To: sashiko-reviews@lists.linux.dev To: "Ian Rogers" Cc: linux-perf-users@vger.kernel.org In-Reply-To: <20261206021147.3036701-5-irogers@google.com> References: <20261206021147.3036701-1-irogers@google.com> <20261206021147.3036701-5-irogers@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 06 Dec 2026 02:28:06 +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 pmu-events: missing assert on _args in generate_model() breaks mypy -- commit 6bfab9e49f5b6e421aa597a42d3e2b3c68425bb1 Author: Ian Rogers perf pmu-events: Batch metric generation and scope via mapfile.csv This commit adds mapfile.csv vendor scoping and multi-model batch helpers to metric.py, and extends amd_metrics.py, arm64_metrics.py, and intel_metrics.= py with an --output-dir option to generate multiple models in one process. > diff --git a/tools/perf/pmu-events/amd_metrics.py b/tools/perf/pmu-events= /amd_metrics.py > index 42569b9153f45..3768fa875cd54 100755 > --- a/tools/perf/pmu-events/amd_metrics.py > +++ b/tools/perf/pmu-events/amd_metrics.py [ ... ] > @@ -508,37 +508,55 @@ def main() -> None: [ ... ] > _args =3D parser.parse_args() > + if _args.output_dir and _args.metricgroups: > + parser.error("--output-dir cannot be combined with -metricgroups= ") > + if not _args.output_dir and "," in _args.model: > + parser.error("Multiple comma-separated models require --output-d= ir") > + > + def generate_model(model: str, preloaded_all_events=3DNone) -> Metri= cGroup: > + global _zen_model > + _args.model =3D model > + directory =3D f"{_args.events_path}/x86/{model}/" [Severity: Medium] Does accessing _args inside generate_model() break mypy? Module-level _args is initialized to None, so mypy types it as Optional[argparse.Namespace] and does not carry narrowing into the typed nested function generate_model(). This produces union-attr errors on _args.model and _args.events_path, breaking mypy-pmu-events during builds. The same issue occurs in generate_model() in arm64_metrics.py (which also accesses _args.vendor) and intel_metrics.py. Adding "assert _args is not None" at the start of generate_model() in all three scripts matches scan_arch_tree() in jevents.py. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261206021147.3036= 701-1-irogers@google.com?part=3D4