mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 05:45:09 +07:00
b4bf274198
In trace events as tracepoints context are not able to be retrieve with task_pt_regs. Without arch caller regs support the pt_regs context will be all zero, perf can not parsing the callchain and resolving the symbols correctly, some time will even get into deadlock while handling the page fault, eg: perf kmem —page record ls Changelog - Add test case cmd in comment - Use regs_fp(regs) which is defined in abi/regdef.h Signed-off-by: Mao Han <han_mao@c-sky.com> Signed-off-by: Guo Ren <guoren@kernel.org>
16 lines
418 B
C
16 lines
418 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
|
|
|
|
#ifndef __ASM_CSKY_PERF_EVENT_H
|
|
#define __ASM_CSKY_PERF_EVENT_H
|
|
|
|
#include <abi/regdef.h>
|
|
|
|
#define perf_arch_fetch_caller_regs(regs, __ip) { \
|
|
(regs)->pc = (__ip); \
|
|
regs_fp(regs) = (unsigned long) __builtin_frame_address(0); \
|
|
asm volatile("mov %0, sp\n":"=r"((regs)->usp)); \
|
|
}
|
|
|
|
#endif /* __ASM_PERF_EVENT_ELF_H */
|