aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/trace/ftrace.c5
-rw-r--r--kernel/trace/trace.h1
-rw-r--r--kernel/trace/trace_stack.c8
3 files changed, 12 insertions, 2 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)
313 ftrace_trace_function = func; 313 ftrace_trace_function = func;
314} 314}
315 315
316int using_ftrace_ops_list_func(void)
317{
318 return ftrace_trace_function == ftrace_ops_list_func;
319}
320
316static void add_ftrace_ops(struct ftrace_ops **list, struct ftrace_ops *ops) 321static void add_ftrace_ops(struct ftrace_ops **list, struct ftrace_ops *ops)
317{ 322{
318 ops->next = *list; 323 ops->next = *list;
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 5d2f07d6746c..8624b5041466 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -830,6 +830,7 @@ void ftrace_destroy_function_files(struct trace_array *tr);
830void ftrace_init_global_array_ops(struct trace_array *tr); 830void ftrace_init_global_array_ops(struct trace_array *tr);
831void ftrace_init_array_ops(struct trace_array *tr, ftrace_func_t func); 831void ftrace_init_array_ops(struct trace_array *tr, ftrace_func_t func);
832void ftrace_reset_array_ops(struct trace_array *tr); 832void ftrace_reset_array_ops(struct trace_array *tr);
833int using_ftrace_ops_list_func(void);
833#else 834#else
834static inline int ftrace_trace_task(struct task_struct *task) 835static inline int ftrace_trace_task(struct task_struct *task)
835{ 836{
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
index 21b320e5d163..5aa9a5b9b6e2 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -85,8 +85,12 @@ check_stack(unsigned long ip, unsigned long *stack)
85 85
86 max_stack_size = this_size; 86 max_stack_size = this_size;
87 87
88 max_stack_trace.nr_entries = 0; 88 max_stack_trace.nr_entries = 0;
89 max_stack_trace.skip = 3; 89
90 if (using_ftrace_ops_list_func())
91 max_stack_trace.skip = 4;
92 else
93 max_stack_trace.skip = 3;
90 94
91 save_stack_trace(&max_stack_trace); 95 save_stack_trace(&max_stack_trace);
92 96