From: Stanislav Fomichev Date: Tue, 8 Jul 2014 16:03:42 +0000 (+0400) Subject: perf timechart: Conditionally update start_time on fork X-Git-Tag: v3.17-rc1~135^2~6^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=962e310af5dff432745ae7494096ed54b752e63e;p=platform%2Fkernel%2Flinux-exynos.git perf timechart: Conditionally update start_time on fork We don't need to overwrite current task start_time on fork, so update it only if it's zero. Signed-off-by: Stanislav Fomichev Acked-by: Namhyung Kim Link: http://lkml.kernel.org/n/1404835423-23098-4-git-send-email-stfomichev@yandex-team.ru Signed-off-by: Jiri Olsa --- diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 4079062..37bf1eb 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -242,7 +242,7 @@ static void pid_fork(struct timechart *tchart, int pid, int ppid, u64 timestamp) pid_set_comm(tchart, pid, pp->current->comm); p->start_time = timestamp; - if (p->current) { + if (p->current && !p->current->start_time) { p->current->start_time = timestamp; p->current->state_since = timestamp; }