On Mon, Nov 09, 2020 at 06:16:10PM -0500, Steven Rostedt wrote:
> ftrace_caller:
> [..]
> movq $0, CS(%rsp) <- loads zero into pt_regs->cs for internal use only.
> [..]
Argh, I missed that. I failed to spot it in the patch. No worries then.
On Mon, 9 Nov 2020 12:10:43 +0100
Peter Zijlstra wrote:
> > SYM_INNER_LABEL(ftrace_caller_op_ptr, SYM_L_GLOBAL)
> > /* Load the ftrace_ops into the 3rd parameter */
> > movq function_trace_op(%rip), %rdx
> >
> > - /* regs go into 4th parameter (but make it NULL) */
> > - movq $0,
On Fri, Nov 06, 2020 at 04:42:36PM -0500, Steven Rostedt wrote:
> +static __always_inline struct pt_regs *
> +arch_ftrace_get_regs(struct ftrace_regs *fregs)
> +{
> + /* Only when FL_SAVE_REGS is set, cs will be non zero */
> + if (!fregs->regs.cs)
> + return NULL;
> +
From: "Steven Rostedt (VMware)"
Currently, the only way to get access to the registers of a function via a
ftrace callback is to set the "FL_SAVE_REGS" bit in the ftrace_ops. But as this
saves all regs as if a breakpoint were to trigger (for use with kprobes), it
is expensive.
The regs are
4 matches
Mail list logo