Skip to contentSkip to conversation

aarch64 missing from Revert "perf/x86: Always store regs->ip in perf_callchain_kernel()"

DISCUSSION Eugene Loh 2 participants 2 messages Jan 12 – Jan 13

lore
Share & tools
lore

Eugene Loh

author
#0 lore raw

Thanks for reverting that patch:
https://lore.kernel.org/r/[email protected]
https://github.com/torvalds/linux/commit/6d08340d1e354787d6c65a8c3cdd4d41ffb8a5ed
    Revert "perf/x86: Always store regs->ip in perf_callchain_kernel()" This reverts commit 83f44ae.

But it seems to me that this issue is not specific to x86.  For example, here is aarch64, using a 6.18 kernel:

    # bpftrace -e 'tracepoint:sched:sched_process_exec { print(kstack()); }'

        perf_trace_sched_process_exec+16
        perf_trace_sched_process_exec+16
        __traceiter_sched_process_exec+80
        exec_binprm+908
        bprm_execve.part.0+464
        bprm_execve+68
        do_execveat_common.isra.0+456
        __arm64_sys_execve+76
        invoke_syscall+112
        el0_svc_common.constprop.0+264
        do_el0_svc+36
        el0_svc+56
        el0t_64_sync_handler+184
        el0t_64_sync+412

The leaf IP is repeated.  Are corresponding changes needed for processors other than just x86?

#1 lore raw
Quoted 5 lines · Eugene Loh

Thanks for reverting that patch:
https://lore.kernel.org/r/[email protected]
https://github.com/torvalds/linux/commit/6d08340d1e354787d6c65a8c3cdd4d41ffb8a5ed
    Revert "perf/x86: Always store regs->ip in perf_callchain_kernel()" This reverts commit 83f44ae.

hi,
thanks for the report, I did not check aarch64, just x86_64 and there's even more fun with it:
https://lore.kernel.org/bpf/[email protected]/T/#mac207867799058c9b0cb273b09e9a2aaf552eebf

Quoted 21 lines

But it seems to me that this issue is not specific to x86.  For example, here is aarch64, using a 6.18 kernel:

    # bpftrace -e 'tracepoint:sched:sched_process_exec { print(kstack()); }'

        perf_trace_sched_process_exec+16
        perf_trace_sched_process_exec+16
        __traceiter_sched_process_exec+80
        exec_binprm+908
        bprm_execve.part.0+464
        bprm_execve+68
        do_execveat_common.isra.0+456
        __arm64_sys_execve+76
        invoke_syscall+112
        el0_svc_common.constprop.0+264
        do_el0_svc+36
        el0_svc+56
        el0t_64_sync_handler+184
        el0t_64_sync+412

Quoted 3 lines

The leaf IP is repeated.  Are corresponding changes needed for processors other than just x86?

probably.. I think it's very arch code that will need investigation from somebody fluent in aarch64, adding Will ;-)

thanks,
jirka