From: Li Zefan Date: Fri, 26 Jun 2009 03:15:37 +0000 (+0800) Subject: ftrace: Fix the output of profile X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0296e4254f3318e0dcad9706fa1daf8e5addc1e9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Steven Rostedt Cc: Frederic Weisbecker LKML-Reference: <4A443D59.4080307@cn.fujitsu.com> Signed-off-by: Ingo Molnar --- 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)