aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-timechart.c
diff options
context:
space:
mode:
authorStanislav Fomichev <stfomichev@yandex-team.ru>2014-07-08 12:03:42 -0400
committerJiri Olsa <jolsa@kernel.org>2014-07-09 18:22:54 -0400
commit962e310af5dff432745ae7494096ed54b752e63e (patch)
treedc6e964ad362dd54d14a0f07b5c4ef28b2059103 /tools/perf/builtin-timechart.c
parentb97b59b93d10a54022afb06d5725d7aa55d98dd7 (diff)
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 <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>
Diffstat (limited to 'tools/perf/builtin-timechart.c')
-rw-r--r--tools/perf/builtin-timechart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 4079062d25b0..37bf1eb0755f 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)
242 pid_set_comm(tchart, pid, pp->current->comm); 242 pid_set_comm(tchart, pid, pp->current->comm);
243 243
244 p->start_time = timestamp; 244 p->start_time = timestamp;
245 if (p->current) { 245 if (p->current && !p->current->start_time) {
246 p->current->start_time = timestamp; 246 p->current->start_time = timestamp;
247 p->current->state_since = timestamp; 247 p->current->state_since = timestamp;
248 } 248 }