From: tip-bot for Li Zefan <lizf@cn.fujitsu.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
fweisbec@gmail.com, rostedt@goodmis.org, lizf@cn.fujitsu.com,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:tracing/urgent] ftrace: Fix the output of profile
Date: Fri, 26 Jun 2009 07:27:53 GMT [thread overview]
Message-ID: <tip-0296e4254f3318e0dcad9706fa1daf8e5addc1e9@git.kernel.org> (raw)
In-Reply-To: <4A443D59.4080307@cn.fujitsu.com>
Commit-ID: 0296e4254f3318e0dcad9706fa1daf8e5addc1e9
Gitweb: http://git.kernel.org/tip/0296e4254f3318e0dcad9706fa1daf8e5addc1e9
Author: Li Zefan <lizf@cn.fujitsu.com>
AuthorDate: Fri, 26 Jun 2009 11:15:37 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 26 Jun 2009 09:25:42 +0200
ftrace: Fix the output of profile
The first entry of the ftrace profile was always skipped when
reading trace_stat/functionX.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A443D59.4080307@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/trace/ftrace.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 71a52c1..f3716bf 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -291,7 +291,9 @@ function_stat_next(void *v, int idx)
pg = (struct ftrace_profile_page *)((unsigned long)rec & PAGE_MASK);
again:
- rec++;
+ if (idx != 0)
+ rec++;
+
if ((void *)rec >= (void *)&pg->records[pg->index]) {
pg = pg->next;
if (!pg)
prev parent reply other threads:[~2009-06-26 7:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-26 3:15 [PATCH] ftrace: fix the output of profile Li Zefan
2009-06-26 7:27 ` tip-bot for Li Zefan [this message]
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=tip-0296e4254f3318e0dcad9706fa1daf8e5addc1e9@git.kernel.org \
--to=lizf@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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