Skip to content

Commit

Permalink
ftrace: Fix the output of profile
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Zefan authored and Ingo Molnar committed Jun 26, 2009
1 parent 1155de4 commit 0296e42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0296e42

Please sign in to comment.