[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZFvW5A6C9ZD+bVBU@kernel.org>
Date: Wed, 10 May 2023 14:39:48 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: James Clark <james.clark@....com>,
linux-perf-users@...r.kernel.org,
John Garry <john.g.garry@...cle.com>,
Will Deacon <will@...nel.org>,
Mike Leach <mike.leach@...aro.org>,
Leo Yan <leo.yan@...aro.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf: arm64: Fix build with refcount checking
Em Thu, May 04, 2023 at 09:28:21AM -0700, Ian Rogers escreveu:
> On Thu, May 4, 2023 at 9:09 AM James Clark <james.clark@....com> wrote:
> >
> > With EXTRA_CFLAGS=-DREFCNT_CHECKING=1 and build-test, some unwrapped
> > map accesses appear. Wrap it in the new accessor to fix the error:
> >
> > error: 'struct perf_cpu_map' has no member named 'map'
> >
> > Signed-off-by: James Clark <james.clark@....com>
>
> Thanks James and sorry for the breakage!
> Acked-by: Ian Rogers <irogers@...gle.com>
Thanks, applied.
- Arnaldo
> Ian
>
> > ---
> > tools/perf/arch/arm64/util/header.c | 4 ++--
> > tools/perf/arch/arm64/util/pmu.c | 2 +-
> > 2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/tools/perf/arch/arm64/util/header.c b/tools/perf/arch/arm64/util/header.c
> > index d730666ab95d..80b9f6287fe2 100644
> > --- a/tools/perf/arch/arm64/util/header.c
> > +++ b/tools/perf/arch/arm64/util/header.c
> > @@ -29,8 +29,8 @@ static int _get_cpuid(char *buf, size_t sz, struct perf_cpu_map *cpus)
> > char path[PATH_MAX];
> > FILE *file;
> >
> > - scnprintf(path, PATH_MAX, "%s/devices/system/cpu/cpu%d"MIDR,
> > - sysfs, cpus->map[cpu]);
> > + scnprintf(path, PATH_MAX, "%s/devices/system/cpu/cpu%d" MIDR,
> > + sysfs, RC_CHK_ACCESS(cpus)->map[cpu].cpu);
> >
> > file = fopen(path, "r");
> > if (!file) {
> > diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
> > index fa143acb4c8d..ef1ed645097c 100644
> > --- a/tools/perf/arch/arm64/util/pmu.c
> > +++ b/tools/perf/arch/arm64/util/pmu.c
> > @@ -18,7 +18,7 @@ static struct perf_pmu *pmu__find_core_pmu(void)
> > * The cpumap should cover all CPUs. Otherwise, some CPUs may
> > * not support some events or have different event IDs.
> > */
> > - if (pmu->cpus->nr != cpu__max_cpu().cpu)
> > + if (RC_CHK_ACCESS(pmu->cpus)->nr != cpu__max_cpu().cpu)
> > return NULL;
> >
> > return pmu;
> > --
> > 2.34.1
> >
--
- Arnaldo
Powered by blists - more mailing lists