From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@arm.com>,
linux-perf-users@vger.kernel.org,
John Garry <john.g.garry@oracle.com>,
Will Deacon <will@kernel.org>, Mike Leach <mike.leach@linaro.org>,
Leo Yan <leo.yan@linaro.org>,
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>, Namhyung Kim <namhyung@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf: arm64: Fix build with refcount checking
Date: Wed, 10 May 2023 14:39:48 -0300 [thread overview]
Message-ID: <ZFvW5A6C9ZD+bVBU@kernel.org> (raw)
In-Reply-To: <CAP-5=fX+PB9_UVPxwpHwcesupu_8f2c8bp5KOHrG9WAFH4VBpw@mail.gmail.com>
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@arm.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@arm.com>
>
> Thanks James and sorry for the breakage!
> Acked-by: Ian Rogers <irogers@google.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
prev parent reply other threads:[~2023-05-10 17:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-04 16:08 [PATCH] perf: arm64: Fix build with refcount checking James Clark
2023-05-04 16:08 ` James Clark
2023-05-04 16:28 ` Ian Rogers
2023-05-04 16:28 ` Ian Rogers
2023-05-10 17:39 ` 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=ZFvW5A6C9ZD+bVBU@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=john.g.garry@oracle.com \
--cc=jolsa@kernel.org \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mike.leach@linaro.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.