[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <513D8437.8060400@huawei.com>
Date: Mon, 11 Mar 2013 15:13:59 +0800
From: "zhangwei(Jovi)" <jovi.zhangwei@...wei.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...hat.com>
Subject: [PATCH 07/13] tracing/kdb: remove redundant checking
trace_empty is checking in while-loop, so the previous checking
is totally redundant, and more worse, the first trace entry is losted.
so remove it.
Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@...wei.com>
---
kernel/trace/trace_kdb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/trace/trace_kdb.c b/kernel/trace/trace_kdb.c
index 3c5c5df..6489b2e 100644
--- a/kernel/trace/trace_kdb.c
+++ b/kernel/trace/trace_kdb.c
@@ -57,8 +57,7 @@ static void ftrace_dump_buf(int skip_lines, long cpu_file)
ring_buffer_read_start(iter.buffer_iter[cpu_file]);
tracing_iter_reset(&iter, cpu_file);
}
- if (!trace_empty(&iter))
- trace_find_next_entry_inc(&iter);
+
while (!trace_empty(&iter)) {
if (!cnt)
kdb_printf("---------------------------------\n");
--
1.7.9.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists