perf/core: Use perf_cgroup_info->active to check if cgroup is active
authorChengming Zhou <zhouchengming@bytedance.com>
Tue, 29 Mar 2022 15:45:21 +0000 (23:45 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 5 Apr 2022 07:59:45 +0000 (09:59 +0200)
commit6875186aea5ce09a644758d9193265da1cc187c7
treebc6a606f28579611141894f400bfb420c4bfa90c
parenta0827713e298d021d3c79ae7423aea408f3f7c3a
perf/core: Use perf_cgroup_info->active to check if cgroup is active

Since we use perf_cgroup_set_timestamp() to start cgroup time and
set active to 1, then use update_cgrp_time_from_cpuctx() to stop
cgroup time and set active to 0.

We can use info->active directly to check if cgroup is active.

Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220329154523.86438-3-zhouchengming@bytedance.com
kernel/events/core.c