]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ftrace: Fix the output of profile
authorLi Zefan <lizf@cn.fujitsu.com>
Fri, 26 Jun 2009 03:15:37 +0000 (11:15 +0800)
committerIngo Molnar <mingo@elte.hu>
Fri, 26 Jun 2009 07:25:42 +0000 (09:25 +0200)
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

index 71a52c172140fd8a2f9fa43000cd9ac0412986e9..f3716bf04df648418b5f8dc246d54c958097baaf 100644 (file)
@@ -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)