diff options
author | leilei.lin <leilei.lin@alibaba-inc.com> | 2017-09-29 13:54:44 +0800 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-10-10 10:06:55 +0200 |
commit | e6a5203399d19871021c1fa0eb2a08fc63b67e91 (patch) | |
tree | dc4b75868d25650e6ca608107f5c1f3cc150a90a /kernel | |
parent | df0062b27ebf473b372914a3e3574d93790e2b72 (diff) | |
download | linux-e6a5203399d19871021c1fa0eb2a08fc63b67e91.tar.gz linux-e6a5203399d19871021c1fa0eb2a08fc63b67e91.tar.bz2 linux-e6a5203399d19871021c1fa0eb2a08fc63b67e91.zip |
perf/core: Fix cgroup time when scheduling descendants
Update cgroup time when an event is scheduled in by descendants.
Reviewed-and-tested-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: leilei.lin <leilei.lin@alibaba-inc.com>
Signed-off-by: Peter 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.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/events/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 243bfc68d0fe..9d93db81fa36 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -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 */ - if (cgrp == event->cgrp) + if (cgroup_is_descendant(cgrp->css.cgroup, event->cgrp->css.cgroup)) __update_cgrp_time(event->cgrp); } |