lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7chvH8fxOCXL3XUfez-7wsB7jjYyUDBUO10jqcWe+GcSFA@mail.gmail.com>
Date:   Wed, 28 Sep 2022 16:56:48 -0700
From:   Namhyung Kim <namhyung@...nel.org>
To:     James Clark <james.clark@....com>
Cc:     Ian Rogers <irogers@...gle.com>, Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        linux-perf-users <linux-perf-users@...r.kernel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Leo Yan <leo.yan@...aro.org>,
        Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH 3/6] perf stat: Rename saved_value->cpu_map_idx

Hello,

On Wed, Sep 28, 2022 at 3:50 AM James Clark <james.clark@....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@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ