diff options
author | Jiaxing Wang <wangjiaxing@insigma.com.cn> | 2014-04-20 23:10:43 +0800 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-04-24 13:36:03 -0400 |
commit | 7eea4fce0246fe3a15ad7f3bb8d0a56d1f9440e6 (patch) | |
tree | 48f2171d7626e8a09a962cc68b1accfc0c59f2d7 /kernel/trace/ftrace.c | |
parent | ad1438a076e275b70d1a04de1364bc483e5a81db (diff) | |
download | lwn-7eea4fce0246fe3a15ad7f3bb8d0a56d1f9440e6.tar.gz lwn-7eea4fce0246fe3a15ad7f3bb8d0a56d1f9440e6.zip |
tracing/stack_trace: Skip 4 instead of 3 when using ftrace_ops_list_func
When using ftrace_ops_list_func, we should skip 4 instead of 3,
to avoid ftrace_call+0x5/0xb appearing in the stack trace:
Depth Size Location (110 entries)
----- ---- --------
0) 2956 0 update_curr+0xe/0x1e0
1) 2956 68 ftrace_call+0x5/0xb
2) 2888 92 enqueue_entity+0x53/0xe80
3) 2796 80 enqueue_task_fair+0x47/0x7e0
4) 2716 28 enqueue_task+0x45/0x70
5) 2688 12 activate_task+0x22/0x30
Add a function using_ftrace_ops_list_func() to test for this while keeping
ftrace_ops_list_func to remain static.
Link: http://lkml.kernel.org/p/1398006644-5935-2-git-send-email-wangjiaxing@insigma.com.cn
Signed-off-by: Jiaxing Wang <wangjiaxing@insigma.com.cn>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 846888ea2ba4..3cfeb66bda67 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -313,6 +313,11 @@ static void update_ftrace_function(void) ftrace_trace_function = func; } +int using_ftrace_ops_list_func(void) +{ + return ftrace_trace_function == ftrace_ops_list_func; +} + static void add_ftrace_ops(struct ftrace_ops **list, struct ftrace_ops *ops) { ops->next = *list; |