tracing/function-return-tracer: store return stack into task_struct and allocate it dynamically
Impact: use deeper function 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 overruns anymore. Signed-off-by:Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by:
Ingo Molnar <mingo@elte.hu>
Showing
- arch/x86/include/asm/ftrace.h 0 additions, 1 deletionarch/x86/include/asm/ftrace.h
- arch/x86/include/asm/thread_info.h 0 additions, 29 deletionsarch/x86/include/asm/thread_info.h
- arch/x86/kernel/ftrace.c 15 additions, 14 deletionsarch/x86/kernel/ftrace.c
- include/linux/ftrace.h 5 additions, 0 deletionsinclude/linux/ftrace.h
- include/linux/sched.h 11 additions, 12 deletionsinclude/linux/sched.h
- kernel/exit.c 4 additions, 1 deletionkernel/exit.c
- kernel/fork.c 4 additions, 0 deletionskernel/fork.c
- kernel/sched.c 3 additions, 0 deletionskernel/sched.c
- kernel/trace/ftrace.c 95 additions, 1 deletionkernel/trace/ftrace.c
Loading
Please register or sign in to comment