diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-06-26 11:15:37 +0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-26 09:25:42 +0200 |
commit | 0296e4254f3318e0dcad9706fa1daf8e5addc1e9 (patch) | |
tree | 7568f2372564b45fa79bbcdd36273999cae0de8c /kernel | |
parent | 1155de47cd66d0c496d5a6fb2223e980ef1285b2 (diff) | |
download | linux-0296e4254f3318e0dcad9706fa1daf8e5addc1e9.tar.bz2 |
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | 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 71a52c172140..f3716bf04df6 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) |