Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932347AbaFZQLg (ORCPT ); Thu, 26 Jun 2014 12:11:36 -0400 Received: from forward-corp1f.mail.yandex.net ([95.108.130.40]:49919 "EHLO forward-corp1f.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932182AbaFZQLd (ORCPT ); Thu, 26 Jun 2014 12:11:33 -0400 X-Yandex-Uniq: 8303ff53-f027-45c2-9297-68c3871c5e1e 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, bp@suse.de, rusty@rustcorp.com.au Cc: linux-kernel@vger.kernel.org Subject: [PATCH 3/4] perf timechart: conditionally update start_time on fork Date: Thu, 26 Jun 2014 20:11:10 +0400 Message-Id: <1403799071-1252-4-git-send-email-stfomichev@yandex-team.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1403799071-1252-1-git-send-email-stfomichev@yandex-team.ru> References: <1403799071-1252-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.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/