diff options
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 3bcb340d6f02..8c9c2934c45f 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -666,6 +666,10 @@ static void profile_graph_return(struct ftrace_graph_ret *trace) | |||
666 | if (!stat->hash || !ftrace_profile_enabled) | 666 | if (!stat->hash || !ftrace_profile_enabled) |
667 | goto out; | 667 | goto out; |
668 | 668 | ||
669 | /* If the calltime was zero'd ignore it */ | ||
670 | if (!trace->calltime) | ||
671 | goto out; | ||
672 | |||
669 | calltime = trace->rettime - trace->calltime; | 673 | calltime = trace->rettime - trace->calltime; |
670 | 674 | ||
671 | if (!(trace_flags & TRACE_ITER_GRAPH_TIME)) { | 675 | if (!(trace_flags & TRACE_ITER_GRAPH_TIME)) { |
@@ -3357,11 +3361,11 @@ void unregister_ftrace_graph(void) | |||
3357 | goto out; | 3361 | goto out; |
3358 | 3362 | ||
3359 | ftrace_graph_active--; | 3363 | ftrace_graph_active--; |
3360 | unregister_trace_sched_switch(ftrace_graph_probe_sched_switch); | ||
3361 | ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub; | 3364 | ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub; |
3362 | ftrace_graph_entry = ftrace_graph_entry_stub; | 3365 | ftrace_graph_entry = ftrace_graph_entry_stub; |
3363 | ftrace_shutdown(FTRACE_STOP_FUNC_RET); | 3366 | ftrace_shutdown(FTRACE_STOP_FUNC_RET); |
3364 | unregister_pm_notifier(&ftrace_suspend_notifier); | 3367 | unregister_pm_notifier(&ftrace_suspend_notifier); |
3368 | unregister_trace_sched_switch(ftrace_graph_probe_sched_switch); | ||
3365 | 3369 | ||
3366 | out: | 3370 | out: |
3367 | mutex_unlock(&ftrace_lock); | 3371 | mutex_unlock(&ftrace_lock); |