lkml.org 
[lkml]   [2008]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing/function-return-tracer: clean up task start/exit callbacks
2008/11/23 Ingo Molnar <mingo@elte.hu>:
>
> * Frederic Weisbecker <fweisbec@gmail.com> wrote:
>
>> Impact: use deeper tracing depth safely
>>
>> Some tests showed that function return tracing needed a more deeper depth
>> of function calls. But it could be unsafe to store these return addresses
>> to the stack.
>> So these arrays will now be allocated dynamically into task_struct of current
>> only when the tracer is activated.
>>
>> Typical scheme when tracer is activated:
>> _ allocate a return stack for each task in global list.
>> _ fork: allocate the return stack for the newly created task
>> _ exit: free return stack of current
>> _ idle init: same as fork
>>
>> I chose a default depth of 50. I don't have anymore overruns (didn't tested for
>> a long time).
>>
>> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
>> Cc: Steven Rostedt <rostedt@goodmis.org>
>> ---
>> arch/x86/include/asm/ftrace.h | 1 -
>> arch/x86/include/asm/thread_info.h | 29 -----------
>> arch/x86/kernel/ftrace.c | 29 ++++++-----
>> include/linux/ftrace.h | 5 ++
>> include/linux/sched.h | 23 ++++-----
>> kernel/exit.c | 5 ++-
>> kernel/fork.c | 4 ++
>> kernel/sched.c | 3 +
>> kernel/trace/ftrace.c | 96 +++++++++++++++++++++++++++++++++++-
>> 9 files changed, 137 insertions(+), 58 deletions(-)
>
> nice! Applied to tip/tracing/function-return-tracer and i started
> testing it as well.
>
> I've done the small cleanup below on top of your patch - we try to
> avoid #ifdefs in core kernel code as much as possible, by hiding
> .config details into include files.
>
> Ingo

Ok thanks!


\
 
 \ /
  Last update: 2008-11-23 17:15    [W:0.053 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site