diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-10-13 03:24:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-13 03:24:59 -0400 |
commit | 2c96c142e941041973faab20ca3b82d57f435c5e (patch) | |
tree | 45188f0ecb3f4bb7408a7219f8fcd041d500235a /kernel/trace/ftrace.c | |
parent | 3c355863fb32070a2800f41106519c5c3038623a (diff) | |
parent | 8ad807318fcd62aba0e18c7c7fbfcc1af3fcdbab (diff) |
Merge branch 'tracing/urgent' into tracing/core
Merge reason: Pick up tracing/filters fix from the urgent queue,
we will queue up dependent patches.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 9a72853a8f0a..1a7f6abd06bf 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -1078,14 +1078,9 @@ static void ftrace_replace_code(int enable) | |||
1078 | failed = __ftrace_replace_code(rec, enable); | 1078 | failed = __ftrace_replace_code(rec, enable); |
1079 | if (failed) { | 1079 | if (failed) { |
1080 | rec->flags |= FTRACE_FL_FAILED; | 1080 | rec->flags |= FTRACE_FL_FAILED; |
1081 | if ((system_state == SYSTEM_BOOTING) || | 1081 | ftrace_bug(failed, rec->ip); |
1082 | !core_kernel_text(rec->ip)) { | 1082 | /* Stop processing */ |
1083 | ftrace_free_rec(rec); | 1083 | return; |
1084 | } else { | ||
1085 | ftrace_bug(failed, rec->ip); | ||
1086 | /* Stop processing */ | ||
1087 | return; | ||
1088 | } | ||
1089 | } | 1084 | } |
1090 | } while_for_each_ftrace_rec(); | 1085 | } while_for_each_ftrace_rec(); |
1091 | } | 1086 | } |
@@ -2608,19 +2603,17 @@ static int ftrace_convert_nops(struct module *mod, | |||
2608 | } | 2603 | } |
2609 | 2604 | ||
2610 | #ifdef CONFIG_MODULES | 2605 | #ifdef CONFIG_MODULES |
2611 | void ftrace_release(void *start, void *end) | 2606 | void ftrace_release_mod(struct module *mod) |
2612 | { | 2607 | { |
2613 | struct dyn_ftrace *rec; | 2608 | struct dyn_ftrace *rec; |
2614 | struct ftrace_page *pg; | 2609 | struct ftrace_page *pg; |
2615 | unsigned long s = (unsigned long)start; | ||
2616 | unsigned long e = (unsigned long)end; | ||
2617 | 2610 | ||
2618 | if (ftrace_disabled || !start || start == end) | 2611 | if (ftrace_disabled) |
2619 | return; | 2612 | return; |
2620 | 2613 | ||
2621 | mutex_lock(&ftrace_lock); | 2614 | mutex_lock(&ftrace_lock); |
2622 | do_for_each_ftrace_rec(pg, rec) { | 2615 | do_for_each_ftrace_rec(pg, rec) { |
2623 | if ((rec->ip >= s) && (rec->ip < e)) { | 2616 | if (within_module_core(rec->ip, mod)) { |
2624 | /* | 2617 | /* |
2625 | * rec->ip is changed in ftrace_free_rec() | 2618 | * rec->ip is changed in ftrace_free_rec() |
2626 | * It should not between s and e if record was freed. | 2619 | * It should not between s and e if record was freed. |
@@ -2652,9 +2645,7 @@ static int ftrace_module_notify(struct notifier_block *self, | |||
2652 | mod->num_ftrace_callsites); | 2645 | mod->num_ftrace_callsites); |
2653 | break; | 2646 | break; |
2654 | case MODULE_STATE_GOING: | 2647 | case MODULE_STATE_GOING: |
2655 | ftrace_release(mod->ftrace_callsites, | 2648 | ftrace_release_mod(mod); |
2656 | mod->ftrace_callsites + | ||
2657 | mod->num_ftrace_callsites); | ||
2658 | break; | 2649 | break; |
2659 | } | 2650 | } |
2660 | 2651 | ||