From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966735AbaFTKaI (ORCPT ); Fri, 20 Jun 2014 06:30:08 -0400 Received: from forward-corp1f.mail.yandex.net ([95.108.130.40]:38780 "EHLO forward-corp1f.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966458AbaFTKaD (ORCPT ); Fri, 20 Jun 2014 06:30:03 -0400 X-Yandex-Uniq: e0682fa0-5c32-421a-8c87-8b2d04afe7f8 Authentication-Results: smtpcorp4.mail.yandex.net; dkim=pass header.i=@yandex-team.ru From: Stanislav Fomichev To: a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com, acme@kernel.org, stfomichev@yandex-team.ru, namhyung@kernel.org, artagnon@gmail.com, jolsa@redhat.com, rusty@rustcorp.com.au, bp@suse.de Cc: linux-kernel@vger.kernel.org Subject: [PATCH 3/4] perf timechart: conditionally update start_time on fork Date: Fri, 20 Jun 2014 14:29:50 +0400 Message-Id: <1403260191-10079-4-git-send-email-stfomichev@yandex-team.ru> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1403260191-10079-1-git-send-email-stfomichev@yandex-team.ru> References: <1403260191-10079-1-git-send-email-stfomichev@yandex-team.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- tools/perf/builtin-timechart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 8d454c55bc4e..011569becc65 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; } -- 1.8.3.2