File Index
Files and directories
Sign in
FILE

perf_callchain.c

File preview with syntax highlighting.

linux-6.19.14/arch/arm64/kernel/perf_callchain.c C
 1// SPDX-License-Identifier: GPL-2.0-only
 2/*
 3 * arm64 callchain support
 4 *
 5 * Copyright (C) 2015 ARM Limited
 6 */
 7#include <linux/perf_event.h>
 8#include <linux/stacktrace.h>
 9#include <linux/uaccess.h>
10
11#include <asm/pointer_auth.h>
12
13static bool callchain_trace(void *data, unsigned long pc)
14{
15	struct perf_callchain_entry_ctx *entry = data;
16
17	return perf_callchain_store(entry, pc) == 0;
18}
19
20void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
21			 struct pt_regs *regs)
22{
23	if (perf_guest_state()) {
24		/* We don't support guest os callchain now */
25		return;
26	}
27
28	arch_stack_walk_user(callchain_trace, entry, regs);
29}
30
31void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
32			   struct pt_regs *regs)
33{
34	if (perf_guest_state()) {
35		/* We don't support guest os callchain now */
36		return;
37	}
38
39	arch_stack_walk(callchain_trace, entry, current, regs);
40}
~/ Read-only file preview.