public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: ctshao@google.com, namhyung@kernel.org, adrian.hunter@intel.com,
	alexander.shishkin@linux.intel.com, james.clark@linaro.org,
	jolsa@kernel.org, linux-kernel@vger.kernel.org,
	linux-perf-users@vger.kernel.org, mingo@redhat.com,
	peterz@infradead.org, yang.lee@linux.alibaba.com
Subject: Re: [PATCH v1] perf test parse-metric: Ensure aggregate counts appear to have run
Date: Sun, 8 Feb 2026 11:29:04 -0300	[thread overview]
Message-ID: <aYidsNiGztDlfJeh@x1> (raw)
In-Reply-To: <20260208055455.2437197-1-irogers@google.com>

On Sat, Feb 07, 2026 at 09:54:55PM -0800, Ian Rogers wrote:
> Commit bb5a920b9099 ("perf stat: Ensure metrics are displayed even
> with failed events") made it so that counters which weren't enabled in
> the kernel were handled as NaN in metrics. This cased the "Parse and
> process metrics" test to start failing as it wasn't putting a non-zero
> value in these variables. Add arbitrary values of 1 to fix the test.
> 
> Fixes: bb5a920b9099 ("perf stat: Ensure metrics are displayed even with failed events")

Thanks, applied to perf-tools-next,

- Arnaldo
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/tests/parse-metric.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/perf/tests/parse-metric.c b/tools/perf/tests/parse-metric.c
> index 6bbc209a5c6a..7c7f489a5eb0 100644
> --- a/tools/perf/tests/parse-metric.c
> +++ b/tools/perf/tests/parse-metric.c
> @@ -41,6 +41,8 @@ static void load_runtime_stat(struct evlist *evlist, struct value *vals)
>  		count = find_value(evsel->name, vals);
>  		evsel->supported = true;
>  		evsel->stats->aggr->counts.val = count;
> +		evsel->stats->aggr->counts.ena = 1;
> +		evsel->stats->aggr->counts.run = 1;
>  	}
>  }
>  
> -- 
> 2.53.0.239.g8d8fc8a987-goog

      reply	other threads:[~2026-02-08 14:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 23:06 [PATCH] perf stat: Ensure metrics are displayed even with failed events Chun-Tse Shao
2026-02-03 23:41 ` Ian Rogers
2026-02-06 21:17   ` Arnaldo Carvalho de Melo
2026-02-08  1:30     ` Ian Rogers
2026-02-08  5:54       ` [PATCH v1] perf test parse-metric: Ensure aggregate counts appear to have run Ian Rogers
2026-02-08 14:29         ` Arnaldo Carvalho de Melo [this message]

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=aYidsNiGztDlfJeh@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ctshao@google.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --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 \
    --cc=yang.lee@linux.alibaba.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