public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: Thomas Richter <tmricht@linux.ibm.com>
Cc: Ian Rogers <irogers@google.com>,
	"linux-perf-use." <linux-perf-users@vger.kernel.org>,
	Jan Polensky <japo@linux.ibm.com>
Subject: Re: perf stat issue with 7.0.0rc3
Date: Fri, 13 Mar 2026 15:13:26 +0000	[thread overview]
Message-ID: <20260313151326.GO4153946@e132581.arm.com> (raw)
In-Reply-To: <66d0366b-8690-4bde-aba4-1d51f278dfa1@linux.ibm.com>

On Fri, Mar 13, 2026 at 02:13:18PM +0100, Thomas Richter wrote:
> Ian, 
> 
> I just discovered a strange behavior on linux 7.0.0rc3.
> 
> I run these commands on my x86 virtual machine:
> 
> bash-5.3# uname -m
> x86_64
> bash-5.3# perf -v
> perf version 6.18.13-200.fc43.x86_64
> bash-5.3# perf stat -- true
> 
>  Performance counter stats for 'true':
> 
>          1.108.929      task-clock                       #    0,437 CPUs utilized             
>                  0      context-switches                 #    0,000 /sec                      
>                  0      cpu-migrations                   #    0,000 /sec                      
>                 55      page-faults                      #   49,597 K/sec                     
>    <not supported>      cycles                                                                
> 
>        0,002536439 seconds time elapsed
> 
>        0,001363000 seconds user
>        0,001393000 seconds sys
> 
> bash-5.3#
> 
> This is the epected output, however when I use the perf version 7.0.0rc3:
> 
> bash-5.3# ./perf -v
> perf version 7.0.rc3.g1f318b96cc84
> bash-5.3# ./perf stat -- true
> Error:
> No supported events found.
> trace.args_alignment
> bash-5.3# 
> 
> Same happens on my s390 systems (LPAR and z/VM).
> Is this a known already?

I assume you are missing the patch below.  It has been picked to
perf-tools-next but not landed to mainline.

Author: Ian Rogers <irogers@google.com>
Date:   Fri Feb 6 16:49:56 2026 -0800

    perf metricgroup: Fix metricgroup__has_metric_or_groups

    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>
    Reviewed-by: Leo Yan <leo.yan@arm.com>
    Tested-by: Leo Yan <leo.yan@arm.com>
    Signed-off-by: Namhyung Kim <namhyung@kernel.org>

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;
 }

  reply	other threads:[~2026-03-13 15:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 13:13 perf stat issue with 7.0.0rc3 Thomas Richter
2026-03-13 15:13 ` Leo Yan [this message]
2026-03-13 15:19 ` Arnaldo Carvalho de Melo
2026-03-13 15:41   ` Ian Rogers
2026-03-13 15:56     ` Arnaldo Melo
2026-03-13 16:10       ` Ian Rogers
2026-03-13 17:01         ` Arnaldo Melo
2026-03-13 18:27           ` Ian Rogers
2026-03-13 21:10             ` Namhyung Kim
2026-03-17 20:19             ` Arnaldo Carvalho de Melo
2026-03-17 19:39     ` Arnaldo Carvalho de Melo
2026-03-17 19:56       ` Arnaldo Carvalho de Melo
2026-03-17 20:12         ` Arnaldo Carvalho de Melo
2026-03-17 20:50           ` Ian Rogers
2026-03-18  0:37             ` Arnaldo Carvalho de Melo
2026-03-18  2:25               ` Ian Rogers
2026-03-19  1:01                 ` [PATCH v1] perf metrics: Make common stalled metrics conditional on having the event Ian Rogers
2026-03-24  4:19                 ` perf stat issue with 7.0.0rc3 Ian Rogers

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=20260313151326.GO4153946@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=irogers@google.com \
    --cc=japo@linux.ibm.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=tmricht@linux.ibm.com \
    /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