linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: James Clark <james.clark@arm.com>
Cc: Ian Rogers <irogers@google.com>, Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-perf-users <linux-perf-users@vger.kernel.org>,
	Andi Kleen <ak@linux.intel.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	Leo Yan <leo.yan@linaro.org>,
	Zhengjun Xing <zhengjun.xing@linux.intel.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>
Subject: Re: [PATCH 3/6] perf stat: Rename saved_value->cpu_map_idx
Date: Wed, 28 Sep 2022 16:56:48 -0700	[thread overview]
Message-ID: <CAM9d7chvH8fxOCXL3XUfez-7wsB7jjYyUDBUO10jqcWe+GcSFA@mail.gmail.com> (raw)
In-Reply-To: <288ee488-c50f-252d-b886-1bef89b5e883@arm.com>

Hello,

On Wed, Sep 28, 2022 at 3:50 AM James Clark <james.clark@arm.com> wrote:
>
>
>
> On 26/09/2022 21:07, Namhyung Kim wrote:
> > The cpu_map_idx fields is just to differentiate values from other
> > entries.  It doesn't need to be strictly cpu map index.  Actually we can
> > pass thread map index or aggr map index.  So rename the fields first.
> >
> > No functional change intended.
> >
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> >  tools/perf/util/stat-shadow.c | 308 +++++++++++++++++-----------------
> >  1 file changed, 154 insertions(+), 154 deletions(-)
> >
> > diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
> > index 9e1eddeff21b..99d05262055c 100644
> > --- a/tools/perf/util/stat-shadow.c
> > +++ b/tools/perf/util/stat-shadow.c
> > @@ -33,7 +33,7 @@ struct saved_value {
> >       struct evsel *evsel;
> >       enum stat_type type;
> >       int ctx;
> > -     int cpu_map_idx;
> > +     int map_idx;
>
> Do the same variables in stat.c and stat.h also need to be updated? The
> previous change to do this exact thing (5b1af93dbc7e) changed more than
> just these ones.

Thanks for your review!  I'll change the header too.

Note that callers of perf_stat__update_shadow_stats() are free
to use cpu_map_idx as they want.  The previous change fixed
confusion between cpu number and map index.  Actually either
is fine for us as long as it's used consistently.  But we use the
cpu map index for most cases.

Thanks,
Namhyung

  reply	other threads:[~2022-09-28 23:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 20:07 [PATCHSET 0/6] perf stat: Small random cleanups (v1) Namhyung Kim
2022-09-26 20:07 ` [PATCH 1/6] perf stat: Convert perf_stat_evsel.res_stats array Namhyung Kim
2022-09-28 10:33   ` James Clark
2022-09-26 20:07 ` [PATCH 2/6] perf stat: Don't call perf_stat_evsel_id_init() repeatedly Namhyung Kim
2022-09-28 10:41   ` James Clark
2022-09-26 20:07 ` [PATCH 3/6] perf stat: Rename saved_value->cpu_map_idx Namhyung Kim
2022-09-28 10:50   ` James Clark
2022-09-28 23:56     ` Namhyung Kim [this message]
2022-09-29  1:58       ` Ian Rogers
2022-09-26 20:07 ` [PATCH 4/6] perf stat: Use thread map index for shadow stat Namhyung Kim
2022-09-28 14:49   ` James Clark
2022-09-29  2:10   ` Ian Rogers
2022-09-29  4:55     ` Namhyung Kim
2022-09-26 20:07 ` [PATCH 5/6] perf stat: Kill unused per-thread runtime stats Namhyung Kim
2022-09-28 14:51   ` James Clark
2022-09-26 20:07 ` [PATCH 6/6] perf stat: Don't compare runtime stat for shadow stats Namhyung Kim
2022-09-28 14:52   ` James Clark

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=CAM9d7chvH8fxOCXL3XUfez-7wsB7jjYyUDBUO10jqcWe+GcSFA@mail.gmail.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --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).