]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ftrace: don't try to __ftrace_replace_code on !FTRACE_FL_CONVERTED rec
authorZhaolei <zhaolei@cn.fujitsu.com>
Fri, 13 Mar 2009 09:16:34 +0000 (17:16 +0800)
committerIngo Molnar <mingo@elte.hu>
Fri, 13 Mar 2009 09:25:06 +0000 (10:25 +0100)
Do __ftrace_replace_code for !FTRACE_FL_CONVERTED rec will always
fail, we should ignore this rec.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Cc: "Steven Rostedt ;" <rostedt@goodmis.org>
LKML-Reference: <49BA2472.4060206@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/ftrace.c

index 26c45aaf6805c84b20464507d470047890a8a6e6..08f4a624e31f42fde51d482c1f528a747b307fa7 100644 (file)
@@ -532,11 +532,12 @@ static void ftrace_replace_code(int enable)
 
        do_for_each_ftrace_rec(pg, rec) {
                /*
-                * Skip over free records and records that have
-                * failed.
+                * Skip over free records, records that have
+                * failed and not converted.
                 */
                if (rec->flags & FTRACE_FL_FREE ||
-                   rec->flags & FTRACE_FL_FAILED)
+                   rec->flags & FTRACE_FL_FAILED ||
+                   rec->flags & FTRACE_FL_CONVERTED)
                        continue;
 
                /* ignore updates to this record's mcount site */
@@ -548,7 +549,7 @@ static void ftrace_replace_code(int enable)
                }
 
                failed = __ftrace_replace_code(rec, enable);
-               if (failed && (rec->flags & FTRACE_FL_CONVERTED)) {
+               if (failed) {
                        rec->flags |= FTRACE_FL_FAILED;
                        if ((system_state == SYSTEM_BOOTING) ||
                            !core_kernel_text(rec->ip)) {