From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9270739448F; Sat, 12 Sep 2026 07:13:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789197219; cv=none; b=RaXiO7v7J5uf+Xph6FK4lDpp1KE2qG0Kh1LPBoULiJDacff/YXgQtWQ670JfA34y6Op2LCCMhfiJkQEPmb8QqqjP9mfllLQOr2qshQ3ynEkIb6s3HpjUQ2GOWpplDMT4odPhruI9PIi76T8UvjQgcQ4nlhmpSZg199G9osjDN20= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789197219; c=relaxed/simple; bh=XsqmCYjOVya4yIAiHXLaQBdElVlQEqRbtyrE2jBL3is=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=P29ZFNXkFCfzaahlD1vNX7RyNSm/FFcwbJgeATz/APejaMiPakcoK5Iw+xhWAK95Jf7QufI4zLLMB34q0BXMOn7bBrhvkeBaBjZwgWBcw64CofMyzahg/IQO5bApClzgEgLOaTKqSELsS44aJYDUOaostB4BOIZynGBXRSJno2c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Rxynqqtj; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Rxynqqtj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53F411F000FF; Sat, 12 Sep 2026 07:13:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789197218; bh=eUiQyDFTPWOSw+KfDp3dQ8Zn7ytLR6CDeZZMyKwDG6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RxynqqtjBI0+oKf8hEjqAgAFKq+Wr5f8if7Dp7p0M6FBlcRNf1F0xbcAOqe2VhZCU WZaBz9CIKrYztPZVUpKPEeoQ0LclNL/T7iUE++zmxyItdSKCfhtc3Dlu8XxQDPvFSo RBXe0hHBytzxZnSe6MWVh/x3tmGdFfmehX7TxHsU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ian Rogers , Namhyung Kim , Sasha Levin Subject: [PATCH 7.2 0126/1815] perf pmu: Recognize default_core as a core PMU in more places Date: Sat, 12 Sep 2026 08:31:16 +0200 Message-ID: <20260912065651.974054273@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065648.999753832@linuxfoundation.org> References: <20260912065648.999753832@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ian Rogers [ Upstream commit dfab3e4b0bf7f772889e8ebc2fd691fc95b596c9 ] The python metrics code used in places like ilist.py passes a pmu-filter of "default_core" on non-hybrid x86/ARM/.. systems. As a PMU like "cpu" isn't a literal name match then no PMU matches "default_core" and the events fail to parse for the metric. Fix the name matching and PMU lookup for "default_core" and check that it fixes ilist.py. Fixes: 74e2dbe7be50 ("perf tools: Add --pmu-filter option for filtering PMUs") Signed-off-by: Ian Rogers Reviewed‑by: Qinxin Xia Signed-off-by: Namhyung Kim Signed-off-by: Sasha Levin --- tools/perf/util/pmu.c | 6 +++++- tools/perf/util/pmus.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index a550f030b85df..836e3b5615cd8 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -2660,8 +2660,12 @@ bool perf_pmu__wildcard_match(const struct perf_pmu *pmu, const char *wildcard_t pmu->name, pmu->alias_name, }; - bool need_fnmatch = strisglob(wildcard_to_match); + bool need_fnmatch; + if (pmu->is_core && !strcmp(wildcard_to_match, "default_core")) + return true; + + need_fnmatch = strisglob(wildcard_to_match); if (!strncmp(wildcard_to_match, "uncore_", 7)) wildcard_to_match += 7; diff --git a/tools/perf/util/pmus.c b/tools/perf/util/pmus.c index 5e3f571450fe7..e0a4cb2428ca4 100644 --- a/tools/perf/util/pmus.c +++ b/tools/perf/util/pmus.c @@ -150,6 +150,8 @@ struct perf_pmu *perf_pmus__find(const char *name) bool core_pmu; unsigned int to_read_pmus = 0; + if (!strcmp(name, "default_core")) + return perf_pmus__find_core_pmu(); /* * Once PMU is loaded it stays in the list, * so we keep us from multiple reading/parsing -- 2.53.0