Re: [RFC][PATCH 00/14 v2] function_graph: Rewrite to allow multiple users
From: Masami Hiramatsu
Date: Thu May 30 2019 - 05:33:03 EST
On Wed, 29 May 2019 05:25:21 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> On Wed, 29 May 2019 15:47:40 +0900
> Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:
>
>
> > Hi Steve,
> >
> > I found that these interfaces seem tightly coupled with fgraph_ops. But that
> > cause a problem when I'm using it from kretprobe.
>
> I was thinking that the kretprobes could use the fgraph_ops like
> kprobes uses ftrace_ops.
>
> >
> > kretprobe has 2 handlers, entry handler and return handler, and both need
> > pt_regs. But fgraph_ops's entryfunc and retfunc do not pass the pt_regs.
> > That is the biggest issue for me on these APIs.
> > Can we expand fgraph_ops with regs parameter?
>
> Ug. Yeah, of course you need that :-/
>
> OK, so this series isn't enough to allow kretprobes to use it yet. OK,
> I plan on still keeping it because it does allow for placing function
> graph tracer into instances with their own filters.
OK, that will be a "regs" extension.
>
> I'll look into adding a REGS flag like we do with ftrace_ops.
>
> Does the return need all regs? Or is just the return code good enough?
Since it depends on arch, I think all regs we need. And for the entry
handler, we need all.
Thank you,
--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>