diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-04-07 07:47:33 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-07 07:47:45 -0400 |
commit | 93776a8ec746cf9d32c36e5a5b23d28d8be28826 (patch) | |
tree | 6c472ae9f709246ee5268e1d71559d07839fb965 /kernel/trace/ftrace.c | |
parent | 34886c8bc590f078d4c0b88f50d061326639198d (diff) | |
parent | d508afb437daee7cf07da085b635c44a4ebf9b38 (diff) |
Merge branch 'linus' into tracing/core
Merge reason: update to upstream tracing facilities
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index c7f4a4be05dc..678e3d6caf85 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -928,9 +928,14 @@ void ftrace_release(void *start, unsigned long size) | |||
928 | 928 | ||
929 | mutex_lock(&ftrace_lock); | 929 | mutex_lock(&ftrace_lock); |
930 | do_for_each_ftrace_rec(pg, rec) { | 930 | do_for_each_ftrace_rec(pg, rec) { |
931 | if ((rec->ip >= s) && (rec->ip < e) && | 931 | if ((rec->ip >= s) && (rec->ip < e)) { |
932 | !(rec->flags & FTRACE_FL_FREE)) | 932 | /* |
933 | * rec->ip is changed in ftrace_free_rec() | ||
934 | * It should not between s and e if record was freed. | ||
935 | */ | ||
936 | FTRACE_WARN_ON(rec->flags & FTRACE_FL_FREE); | ||
933 | ftrace_free_rec(rec); | 937 | ftrace_free_rec(rec); |
938 | } | ||
934 | } while_for_each_ftrace_rec(); | 939 | } while_for_each_ftrace_rec(); |
935 | mutex_unlock(&ftrace_lock); | 940 | mutex_unlock(&ftrace_lock); |
936 | } | 941 | } |
@@ -3287,6 +3292,9 @@ void unregister_ftrace_graph(void) | |||
3287 | { | 3292 | { |
3288 | mutex_lock(&ftrace_lock); | 3293 | mutex_lock(&ftrace_lock); |
3289 | 3294 | ||
3295 | if (!unlikely(atomic_read(&ftrace_graph_active))) | ||
3296 | goto out; | ||
3297 | |||
3290 | atomic_dec(&ftrace_graph_active); | 3298 | atomic_dec(&ftrace_graph_active); |
3291 | unregister_trace_sched_switch(ftrace_graph_probe_sched_switch); | 3299 | unregister_trace_sched_switch(ftrace_graph_probe_sched_switch); |
3292 | ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub; | 3300 | ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub; |
@@ -3294,6 +3302,7 @@ void unregister_ftrace_graph(void) | |||
3294 | ftrace_shutdown(FTRACE_STOP_FUNC_RET); | 3302 | ftrace_shutdown(FTRACE_STOP_FUNC_RET); |
3295 | unregister_pm_notifier(&ftrace_suspend_notifier); | 3303 | unregister_pm_notifier(&ftrace_suspend_notifier); |
3296 | 3304 | ||
3305 | out: | ||
3297 | mutex_unlock(&ftrace_lock); | 3306 | mutex_unlock(&ftrace_lock); |
3298 | } | 3307 | } |
3299 | 3308 | ||