public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: irogers@google.com
Cc: acme@kernel.org, adrian.hunter@intel.com,
	 alexander.shishkin@linux.intel.com, james.clark@linaro.org,
	jolsa@kernel.org,  leo.yan@arm.com, linux-kernel@vger.kernel.org,
	 linux-perf-users@vger.kernel.org, mingo@redhat.com,
	namhyung@kernel.org,  peterz@infradead.org
Subject: [PATCH v1] perf metricgroup: Fix metricgroup__has_metric_or_groups
Date: Fri,  6 Feb 2026 16:49:56 -0800	[thread overview]
Message-ID: <20260207004956.610458-1-irogers@google.com> (raw)
In-Reply-To: <CAP-5=fXPsOuqr+4DZmscoWGr1VHHJci4jRGxbOtJyy_Mp9Oa9w@mail.gmail.com>

Use metricgroup__for_each_metric rather than
pmu_metrics_table__for_each_metric that combines the default metric
table with, a potentially empty, CPUID table.

Fixes: cee275edcdb1 ("perf metricgroup: Don't early exit if no CPUID table exists")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/metricgroup.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index 46bf4dfeebc8..7e39d469111b 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -1605,9 +1605,9 @@ bool metricgroup__has_metric_or_groups(const char *pmu, const char *metric_or_gr
 		.metric_or_groups = metric_or_groups,
 	};
 
-	return pmu_metrics_table__for_each_metric(table,
-						  metricgroup__has_metric_or_groups_callback,
-						  &data)
+	return metricgroup__for_each_metric(table,
+					    metricgroup__has_metric_or_groups_callback,
+					    &data)
 		? true : false;
 }
 
-- 
2.53.0.239.g8d8fc8a987-goog


  reply	other threads:[~2026-02-07  0:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 18:36 [PATCH v1 1/2] perf tests: build-test coverage for NO_JEVENTS=1 Ian Rogers
2026-02-05 18:36 ` [PATCH v1 2/2] perf metricgroup: Don't early exit if no CPUID table exists Ian Rogers
2026-02-06 10:45   ` Leo Yan
2026-02-06 12:33     ` Leo Yan
2026-02-06 18:57       ` Ian Rogers
2026-02-06 21:50         ` Leo Yan
2026-02-06 22:16           ` Ian Rogers
2026-02-07  0:14             ` Ian Rogers
2026-02-07  0:49               ` Ian Rogers [this message]
2026-02-09  9:22                 ` [PATCH v1] perf metricgroup: Fix metricgroup__has_metric_or_groups Leo Yan
2026-02-09 23:06                   ` Ian Rogers
2026-02-10  9:11                     ` Leo Yan
2026-02-24 17:57                 ` Namhyung Kim
2026-02-06  8:53 ` [PATCH v1 1/2] perf tests: build-test coverage for NO_JEVENTS=1 Leo Yan
2026-02-06 14:57   ` Arnaldo Carvalho de Melo
2026-02-06 14:59   ` Arnaldo Carvalho de Melo
2026-02-06 16:09     ` Leo Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260207004956.610458-1-irogers@google.com \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox