public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ftrace: fix the output of profile
@ 2009-06-26  3:15 Li Zefan
  2009-06-26  7:27 ` [tip:tracing/urgent] ftrace: Fix " tip-bot for Li Zefan
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zefan @ 2009-06-26  3:15 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Steven Rostedt, Frederic Weisbecker, LKML

The first entry of the ftrace profile was always skipped when
reading trace_stat/functionX.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 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 5771cc1..673fc8b 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)
-- 
1.5.4.rc3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip:tracing/urgent] ftrace: Fix the output of profile
  2009-06-26  3:15 [PATCH] ftrace: fix the output of profile Li Zefan
@ 2009-06-26  7:27 ` tip-bot for Li Zefan
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Li Zefan @ 2009-06-26  7:27 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, fweisbec, rostedt, lizf, tglx, mingo

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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-26  7:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-26  3:15 [PATCH] ftrace: fix the output of profile Li Zefan
2009-06-26  7:27 ` [tip:tracing/urgent] ftrace: Fix " tip-bot for Li Zefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox