[lkml]   [2008]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH][RFC 2/23]: SCST core
2008/12/13 Arnaldo Carvalho de Melo <>:
> Steven, is it possible to trigger tracing for any function when a
> function in the list set up by the user is running and then stop tracing
> when it exits?
> - Arnaldo

Hi Arnaldo,

Yes it's possible with ftrace, by using the function graph tracer ( an
ftrace extension that adds the tracing on return).

To enable it just do:
echo function_graph > /debugfs/tracing/current_tracer

And to trace by choosing a particular function as the root of the call
stack, just do the things
explained on this patch:;a=commit;h=ea4e2bc4d9f7370e57a343ccb5e7c0ad3222ec3c

And the tracing will finish after this function returns :-)

 \ /
  Last update: 2008-12-13 02:27    [W:0.160 / U:5.628 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site