On Wed, Jan 24, 2018 at 05:19:34PM +0800, Lin Xiulei wrote: > Sure, and I consider this "OK" works for "What goes wrong if we leave > it set?". : )
It would be good if you inspect the code for the case of leaving cpuctx->cgrp set with no cgroup events left -- AND -- put a blurb about what you found in your new Changelog. I suspect it works out and something like perf_cgroup_switch() will fix things up for us later, but double check and test.

