summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2026-10-18 10:22:05 -0400
committerMagnus Lindholm <linmag7@gmail.com>2026-10-18 20:42:44 +0200
commit1a85a03fc2fe180c1ddc91b4a801d313321d9e53 (patch)
treea6571821a2572f7a435115a6a15a2bcca4b4d34b /tools/perf/scripts/python/stackcollapse.py
parent9280e99d87ddd8c6c7fd83f9ea1585967b3dcd60 (diff)
downloadlinux-1a85a03fc2fe180c1ddc91b4a801d313321d9e53.tar.gz
linux-1a85a03fc2fe180c1ddc91b4a801d313321d9e53.zip
alpha: fill in pc for software event samples
Context switch and tracepoint events have no trap frame, so perf builds one with perf_fetch_caller_regs(). Alpha does not define perf_arch_fetch_caller_regs(), which leaves that pt_regs zeroed, and these samples report pc as 0. Record the caller's address as pc. The zero ps already marks the frame as kernel mode, and pt_regs has nowhere to keep sp, so pc is all that can be filled in. perf_fetch_caller_regs() gets that address from CALLER_ADDR0, which alpha defines as 0 when CONFIG_FRAME_POINTER is disabled. Finding the level zero return address does not need a frame pointer, so make alpha_ftrace_return_address0() available in both configurations. Only ftrace_return_address(n) still depends on frame pointers. Reported-by: Magnus Lindholm <linmag7@gmail.com> Closes: https://lore.kernel.org/all/CA%2B%3DFv5S8-Zk8-LUpZnWiBfTGSQXthepmRc_-a9O%2BpEPmVW0mRA@mail.gmail.com/ Suggested-by: Magnus Lindholm <linmag7@gmail.com> Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Magnus Lindholm <linmag7@gmail.com> Acked-by: Ian Rogers <irogers@google.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Tested-by: Magnus Lindholm <linmag7@gmail.com> Link: https://lore.kernel.org/r/20261018-alpha-perf-regs-v3-v3-5-52be85332c57@gmail.com Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions