diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-06-26 03:15:37 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-26 07:25:42 (GMT) |
commit | 0296e4254f3318e0dcad9706fa1daf8e5addc1e9 (patch) | |
tree | 7568f2372564b45fa79bbcdd36273999cae0de8c /kernel/trace/ftrace.c | |
parent | 1155de47cd66d0c496d5a6fb2223e980ef1285b2 (diff) | |
download | linux-fsl-qoriq-0296e4254f3318e0dcad9706fa1daf8e5addc1e9.tar.xz |
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/trace/ftrace.c')
-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 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) |