提交 962e310a 编写于 作者: S Stanislav Fomichev 提交者: Jiri Olsa

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: NStanislav Fomichev <stfomichev@yandex-team.ru>
Acked-by: NNamhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/1404835423-23098-4-git-send-email-stfomichev@yandex-team.ruSigned-off-by: NJiri Olsa <jolsa@kernel.org>
上级 b97b59b9
...@@ -242,7 +242,7 @@ static void pid_fork(struct timechart *tchart, int pid, int ppid, u64 timestamp) ...@@ -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); pid_set_comm(tchart, pid, pp->current->comm);
p->start_time = timestamp; p->start_time = timestamp;
if (p->current) { if (p->current && !p->current->start_time) {
p->current->start_time = timestamp; p->current->start_time = timestamp;
p->current->state_since = timestamp; p->current->state_since = timestamp;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册