[PATCH v2] perf libunwind: Fixup conversion perf_sample->user_regs to a pointer
Ian Rogers
irogers at google.com
Mon Mar 17 09:02:47 PDT 2025
On Fri, Mar 14, 2025 at 6:12 PM Namhyung Kim <namhyung at kernel.org> wrote:
>
> On Wed, Mar 12, 2025 at 08:31:21PM -0700, Ian Rogers wrote:
> > From: Arnaldo Carvalho de Melo <acme at redhat.com>
> >
> > The dc6d2bc2d893a878 ("perf sample: Make user_regs and intr_regs optional") misses
> > the changes to a file, resulting in this problem:
> >
> > $ make LIBUNWIND=1 -C tools/perf O=/tmp/build/perf-tools-next install-bin
> > <SNIP>
> > CC /tmp/build/perf-tools-next/util/unwind-libunwind-local.o
> > CC /tmp/build/perf-tools-next/util/unwind-libunwind.o
> > <SNIP>
> > util/unwind-libunwind-local.c: In function ‘access_mem’:
> > util/unwind-libunwind-local.c:582:56: error: ‘ui->sample->user_regs’ is a pointer; did you mean to use ‘->’?
> > 582 | if (__write || !stack || !ui->sample->user_regs.regs) {
> > | ^
> > | ->
> > util/unwind-libunwind-local.c:587:38: error: passing argument 2 of ‘perf_reg_value’ from incompatible pointer type [-Wincompatible-pointer-types]
> > 587 | ret = perf_reg_value(&start, &ui->sample->user_regs,
> > | ^~~~~~~~~~~~~~~~~~~~~~
> > | |
> > | struct regs_dump **
> > <SNIP>
> > ⬢ [acme at toolbox perf-tools-next]$ git bisect bad
> > dc6d2bc2d893a878e7b58578ff01b4738708deb4 is the first bad commit
> > commit dc6d2bc2d893a878e7b58578ff01b4738708deb4 (HEAD)
> > Author: Ian Rogers <irogers at google.com>
> > Date: Mon Jan 13 11:43:45 2025 -0800
> >
> > perf sample: Make user_regs and intr_regs optional
> >
> > Detected using:
> >
> > make -C tools/perf build-test
> >
> > Fixes: dc6d2bc2d893a878 ("perf sample: Make user_regs and intr_regs optional")
> > Cc: Adrian Hunter <adrian.hunter at intel.com>
> > Cc: Alexander Shishkin <alexander.shishkin at linux.intel.com>
> > Cc: Andi Kleen <ak at linux.intel.com>
> > Cc: Charlie Jenkins <charlie at rivosinc.com>
> > Cc: Ian Rogers <irogers at google.com>
> > Cc: Ingo Molnar <mingo at redhat.com>
> > Cc: James Clark <james.clark at linaro.org>
> > Cc: John Garry <john.g.garry at oracle.com>
> > Cc: Kan Liang <kan.liang at linux.intel.com>
> > Cc: Leo Yan <leo.yan at linux.dev>
> > Cc: Mark Rutland <mark.rutland at arm.com>
> > Cc: Michael Petlan <mpetlan at redhat.com>
> > Cc: Namhyung Kim <namhyung at kernel.org>
> > Cc: Peter Zijlstra <peterz at infradead.org>
> > Cc: Tavian Barnes <tavianator at tavianator.com>
> > Cc: Veronika Molnarova <vmolnaro at redhat.com>
> > Cc: coresight at lists.linaro.org
> > Cc: linux-arm-kernel at lists.infradead.org
> > Signed-off-by: Arnaldo Carvalho de Melo <acme at redhat.com>
> > Reviewed-by: Ian Rogers <irogers at google.com>
>
> I think you need to add your own Signed-off-by in this case.
> I'll change it for you, ok?
Sure.
Thanks,
Ian
More information about the linux-arm-kernel
mailing list