# Re: \[PATCH v19 07/19\] tracing: Add ftrace\_fill\_perf\_regs() for perf event

- From: Heiko Carstens \<hca@linux.ibm.com\>
- Date: 2024-11-10 17:05:53 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2024/11/2819797
- Thread: https://ratatoskr.run/linux-trace-kernel/2024/11/2819758/t.md

```text
On Mon, Nov 11, 2024 at 12:50:09AM +0900, Masami Hiramatsu (Google) wrote:
> From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> 
> Add ftrace_fill_perf_regs() which should be compatible with the
> perf_fetch_caller_regs(). In other words, the pt_regs returned from the
> ftrace_fill_perf_regs() must satisfy 'user_mode(regs) == false' and can be
> used for stack tracing.
> 
> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> Acked-by: Will Deacon <will@kernel.org>
> ---
>  arch/arm64/include/asm/ftrace.h   |    7 +++++++
>  arch/powerpc/include/asm/ftrace.h |    7 +++++++
>  arch/s390/include/asm/ftrace.h    |    6 ++++++

Acked-by: Heiko Carstens <hca@linux.ibm.com> # s390
```
