lkml.org 
[lkml]   [2020]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V6 08/15] ftrace: Add perf text poke events for ftrace trampolines
On Wed, Apr 22, 2020 at 10:39:06AM +0300, Adrian Hunter wrote:
> On 21/04/20 4:45 pm, Peter Zijlstra wrote:
> > On Sun, Apr 05, 2020 at 11:13:20PM +0300, Adrian Hunter wrote:
> >> Add perf text poke events for ftrace trampolines when created and when
> >> freed.
> >
> > Maybe also put in a little more detail on the various events. Because
> > arch_ftrace_update_trampoline() can also generate text_poke_bp() events,
> > to update an existing trampoline.
> >
> > A diagram, like with the kprobes thing perhaps.
>
> How about adding this:
>
> There can be 3 text_poke events for ftrace trampolines:
>
> 1. NULL -> trampoline
> By ftrace_update_trampoline() when !ops->trampoline
> Trampoline created
>
> 2. [e.g. on x86] CALL rel32 -> CALL rel32
> By arch_ftrace_update_trampoline() when ops->trampoline and
> ops->flags & FTRACE_OPS_FL_ALLOC_TRAMP
> [e.g. on x86] via text_poke_bp() which generates text poke events
> Trampoline-called function target updated
>
> 3. trampoline -> NULL
> By ftrace_trampoline_free() when ops->trampoline and
> ops->flags & FTRACE_OPS_FL_ALLOC_TRAMP
> Trampoline freed

Yes, very nice. Thanks!

\
 
 \ /
  Last update: 2020-04-22 13:47    [W:0.284 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site