From: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>
Subject: [PATCH 07/13] tracing/kdb: remove redundant checking
Date: Mon, 11 Mar 2013 15:13:59 +0800 [thread overview]
Message-ID: <513D8437.8060400@huawei.com> (raw)
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@huawei.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
next reply other threads:[~2013-03-11 7:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 7:13 zhangwei(Jovi) [this message]
2013-03-11 14:09 ` [PATCH 07/13] tracing/kdb: remove redundant checking Steven Rostedt
2013-03-11 14:46 ` Jason Wessel
2013-03-11 15:54 ` Jovi Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=513D8437.8060400@huawei.com \
--to=jovi.zhangwei@huawei.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox