[PATCH -tip 4/4] Tracing/ftrace: adapt the boot tracer to the new print_line type

Previous thread: [PATCH] ACPI: Reduce blacklist-by-date failures to KERN_INFO by Adam Jackson on Monday, September 29, 2008 - 11:29 am. (1 message)

Next thread: [PATCH] Don't print an error message just because there's no i8042 chip by Adam Jackson on Monday, September 29, 2008 - 11:36 am. (1 message)
From: Frederic Weisbecker
Date: Monday, September 29, 2008 - 11:31 am

This patch adapts the boot tracer to the new type of the
print_line callback.
It still relays entries it doesn't support to default output
functions.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 kernel/trace/trace_boot.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
index d5c9e2e..48186b1 100644
--- a/kernel/trace/trace_boot.c
+++ b/kernel/trace/trace_boot.c
@@ -45,21 +45,24 @@ static void boot_trace_ctrl_update(struct trace_array *tr)
 		stop_boot_trace(tr);
 }
 
-static int initcall_print_line(struct trace_iterator *iter)
+static enum print_line_t initcall_print_line(struct trace_iterator *iter)
 {
-	int ret = 0;
+	int ret;
 	struct trace_entry *entry = iter->ent;
 	struct boot_trace *it = &entry->field.initcall;
 	struct trace_seq *s = &iter->seq;
 
-	if (iter->ent->type == TRACE_BOOT)
+	if (iter->ent->type == TRACE_BOOT) {
 		ret = trace_seq_printf(s, "%pF called from %i "
 				       "returned %d after %lld msecs\n",
 				       it->func, it->caller, it->result,
 				       it->duration);
-	if (ret)
-		return 1;
-	return 0;
+		if (ret)
+			return TRACE_TYPE_HANDLED;
+		else
+			return TRACE_TYPE_PARTIAL_LINE;
+	}
+	return TRACE_TYPE_UNHANDLED;
 }
 
 struct tracer boot_tracer __read_mostly =
--

Previous thread: [PATCH] ACPI: Reduce blacklist-by-date failures to KERN_INFO by Adam Jackson on Monday, September 29, 2008 - 11:29 am. (1 message)

Next thread: [PATCH] Don't print an error message just because there's no i8042 chip by Adam Jackson on Monday, September 29, 2008 - 11:36 am. (1 message)