]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf record: Refactor ARM64 leaf caller setup out of arch
authorIan Rogers <irogers@google.com>
Tue, 12 May 2026 05:41:40 +0000 (22:41 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 14 May 2026 23:50:00 +0000 (20:50 -0300)
commit165daffc7c33c94b0b7ef7f5719531f1f8bc0a3a
tree5234346a064cc1be9c6607338263ab43d5836189
parent09d355618f7ccc27ffc7fc668b2e232872962079
perf record: Refactor ARM64 leaf caller setup out of arch

Code in tools/perf/arch causes portability issues/opaqueness and LTO
issues due to the use of weak symbols. Move the adding of LR to the
sample_user_regs into arm64-frame-pointer-unwind-support.c conditional
on EM_HOST == EM_AARCH64 (false on all non-ARM64 builds).

This also better encapsulates the use of the sampled registers by
get_leaf_frame_caller_aarch64 and the set up by the new
add_leaf_frame_caller_opts_aarch64, exposing opportunities for possibly
sampling PC and SP to help the unwinder.

Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mike Leach <mike.leach@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shimin Guo <shimin.guo@skydio.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/arm64/util/Build
tools/perf/arch/arm64/util/machine.c [deleted file]
tools/perf/builtin-record.c
tools/perf/util/arm64-frame-pointer-unwind-support.c
tools/perf/util/arm64-frame-pointer-unwind-support.h
tools/perf/util/callchain.h