linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Stanislav Fomichev <stfomichev@yandex-team.ru>,
	Jiri Olsa <jolsa@kernel.org>
Subject: [PATCH 3/4] perf timechart: Conditionally update start_time on fork
Date: Thu, 10 Jul 2014 23:06:56 +0200	[thread overview]
Message-ID: <1405026417-9094-4-git-send-email-jolsa@kernel.org> (raw)
In-Reply-To: <1405026417-9094-1-git-send-email-jolsa@kernel.org>

From: Stanislav Fomichev <stfomichev@yandex-team.ru>

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 <stfomichev@yandex-team.ru>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/1404835423-23098-4-git-send-email-stfomichev@yandex-team.ru
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 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 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;
 	}
-- 
1.8.3.1


  parent reply	other threads:[~2014-07-10 21:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10 21:06 [GIT PULL 0/4] perf/core improvements and fixes Jiri Olsa
2014-07-10 21:06 ` [PATCH 1/4] perf timechart: Fix rendering in Firefox Jiri Olsa
2014-07-10 21:06 ` [PATCH 2/4] perf timechart: Implement IO mode Jiri Olsa
2014-07-10 21:06 ` Jiri Olsa [this message]
2014-07-10 21:06 ` [PATCH 4/4] perf timechart: Add more options to " Jiri Olsa
2014-07-16 11:48 ` [GIT PULL 0/4] perf/core improvements and fixes Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2014-07-08 16:03 [PATCH v4 0/4] perf timechart io mode Stanislav Fomichev
2014-07-08 16:03 ` [PATCH 3/4] perf timechart: conditionally update start_time on fork Stanislav Fomichev
2014-06-26 16:11 [PATCH v5 0/4] perf timechart io mode Stanislav Fomichev
2014-06-26 16:11 ` [PATCH 3/4] perf timechart: conditionally update start_time on fork Stanislav Fomichev
2014-06-20 10:29 [PATCH v4 0/4] perf timechart io mode Stanislav Fomichev
2014-06-20 10:29 ` [PATCH 3/4] perf timechart: conditionally update start_time on fork Stanislav Fomichev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1405026417-9094-4-git-send-email-jolsa@kernel.org \
    --to=jolsa@kernel.org \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=stfomichev@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).