1 // SPDX-License-Identifier: GPL-2.0-only
3 * arm64 callchain support
5 * Copyright (C) 2015 ARM Limited
7 #include <linux/perf_event.h>
8 #include <linux/stacktrace.h>
9 #include <linux/uaccess.h>
11 #include <asm/pointer_auth.h>
13 static bool callchain_trace(void *data
, unsigned long pc
)
15 struct perf_callchain_entry_ctx
*entry
= data
;
17 return perf_callchain_store(entry
, pc
) == 0;
20 void perf_callchain_user(struct perf_callchain_entry_ctx
*entry
,
23 if (perf_guest_state()) {
24 /* We don't support guest os callchain now */
28 arch_stack_walk_user(callchain_trace
, entry
, regs
);
31 void perf_callchain_kernel(struct perf_callchain_entry_ctx
*entry
,
34 if (perf_guest_state()) {
35 /* We don't support guest os callchain now */
39 arch_stack_walk(callchain_trace
, entry
, current
, regs
);