提交 e6a52033 编写于 作者: L leilei.lin 提交者: Ingo Molnar

perf/core: Fix cgroup time when scheduling descendants

Update cgroup time when an event is scheduled in by descendants.
Reviewed-and-tested-by: NJiri Olsa <jolsa@kernel.org>
Signed-off-by: Nleilei.lin <leilei.lin@alibaba-inc.com>
Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: acme@kernel.org
Cc: alexander.shishkin@linux.intel.com
Cc: brendan.d.gregg@gmail.com
Cc: yang_oliver@hotmail.com
Link: http://lkml.kernel.org/r/CALPjY3mkHiekRkRECzMi9G-bjUQOvOjVBAqxmWkTzc-g+0LwMg@mail.gmail.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
上级 df0062b2
...@@ -662,7 +662,7 @@ static inline void update_cgrp_time_from_event(struct perf_event *event) ...@@ -662,7 +662,7 @@ static inline void update_cgrp_time_from_event(struct perf_event *event)
/* /*
* Do not update time when cgroup is not active * Do not update time when cgroup is not active
*/ */
if (cgrp == event->cgrp) if (cgroup_is_descendant(cgrp->css.cgroup, event->cgrp->css.cgroup))
__update_cgrp_time(event->cgrp); __update_cgrp_time(event->cgrp);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册