aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
authorZhaolei <zhaolei@cn.fujitsu.com>2009-03-13 05:16:34 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-13 05:25:06 -0400
commitfa9d13cf135efbd454453a53b6299976bea245a9 (patch)
tree240d46a90984f3c84f336535269e97559e891104 /kernel/trace/ftrace.c
parentb00f0b6dc1773b4c8f538503247da050b5ea631b (diff)
ftrace: don't try to __ftrace_replace_code on !FTRACE_FL_CONVERTED rec
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>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r--kernel/trace/ftrace.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 26c45aaf6805..08f4a624e31f 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -532,11 +532,12 @@ static void ftrace_replace_code(int enable)
532 532
533 do_for_each_ftrace_rec(pg, rec) { 533 do_for_each_ftrace_rec(pg, rec) {
534 /* 534 /*
535 * Skip over free records and records that have 535 * Skip over free records, records that have
536 * failed. 536 * failed and not converted.
537 */ 537 */
538 if (rec->flags & FTRACE_FL_FREE || 538 if (rec->flags & FTRACE_FL_FREE ||
539 rec->flags & FTRACE_FL_FAILED) 539 rec->flags & FTRACE_FL_FAILED ||
540 rec->flags & FTRACE_FL_CONVERTED)
540 continue; 541 continue;
541 542
542 /* ignore updates to this record's mcount site */ 543 /* ignore updates to this record's mcount site */
@@ -548,7 +549,7 @@ static void ftrace_replace_code(int enable)
548 } 549 }
549 550
550 failed = __ftrace_replace_code(rec, enable); 551 failed = __ftrace_replace_code(rec, enable);
551 if (failed && (rec->flags & FTRACE_FL_CONVERTED)) { 552 if (failed) {
552 rec->flags |= FTRACE_FL_FAILED; 553 rec->flags |= FTRACE_FL_FAILED;
553 if ((system_state == SYSTEM_BOOTING) || 554 if ((system_state == SYSTEM_BOOTING) ||
554 !core_kernel_text(rec->ip)) { 555 !core_kernel_text(rec->ip)) {