linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, James Clark <james.clark@arm.com>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Florian Fischer <florian.fischer@muhq.space>,
	Zhengjun Xing <zhengjun.xing@linux.intel.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Stephane Eranian <eranian@google.com>,
	Perry Taylor <perry.taylor@intel.com>
Subject: Re: [PATCH v1] perf stat: Avoid merging/aggregating metric counts twice
Date: Thu, 9 Feb 2023 18:29:45 -0300	[thread overview]
Message-ID: <Y+VlyR9IF8Ky460u@kernel.org> (raw)
In-Reply-To: <CAM9d7ciJpB8qAN1OW+xe-ofuzK9tgytNyrV4modEePKJicX-=w@mail.gmail.com>

Em Thu, Feb 09, 2023 at 11:06:22AM -0800, Namhyung Kim escreveu:
> On Wed, Feb 8, 2023 at 10:45 PM Ian Rogers <irogers@google.com> wrote:

> > The added perf_stat_merge_counters combines uncore counters. When
> > metrics are enabled, the counts are merged into a metric_leader
> > via the stat-shadow saved_value logic. As the leader now is
> > passed an aggregated count, it leads to all counters being added
> > together twice and counts appearing approximately doubled in
> > metrics.

> > This change disables the saved_value merging of counts for evsels
> > that are merged. It is recommended that later changes remove the
> > saved_value entirely as the two layers of aggregation in the code
> > is confusing.
 
> +1

'perf stat' code needs help, that I'm sure, its great that you guys are
looking/working at/on it, please continue.
 
> >
> > Fixes: 942c5593393d ("perf stat: Add perf_stat_merge_counters()")
> > Reported-by: Perry Taylor <perry.taylor@intel.com>
> > Signed-off-by: Ian Rogers <irogers@google.com>
> 
> Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks, applied.

- Arnaldo

      reply	other threads:[~2023-02-09 21:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09  6:44 [PATCH v1] perf stat: Avoid merging/aggregating metric counts twice Ian Rogers
2023-02-09 19:06 ` Namhyung Kim
2023-02-09 21: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=Y+VlyR9IF8Ky460u@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eddyz87@gmail.com \
    --cc=eranian@google.com \
    --cc=florian.fischer@muhq.space \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=perry.taylor@intel.com \
    --cc=peterz@infradead.org \
    --cc=zhengjun.xing@linux.intel.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;
as well as URLs for NNTP newsgroup(s).