Re: [PATCH 8/9] perf top: Add --all-cgroups option

From: Namhyung Kim
Date: Thu Jan 09 2020 - 02:55:36 EST


On Thu, Jan 9, 2020 at 7:25 AM Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
>
> On Tue, Jan 07, 2020 at 10:35:00PM +0900, Namhyung Kim wrote:
> > The --all-cgroups option is to enable cgroup profiling support. It
> > tells kernel to record CGROUP events in the ring buffer so that perf
> > report can identify task/cgroup association later.
> >
> > Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
> > ---
> > tools/perf/Documentation/perf-top.txt | 4 ++++
> > tools/perf/builtin-top.c | 9 +++++++++
> > 2 files changed, 13 insertions(+)
> >
> > diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
> > index 5596129a71cf..c75507f50071 100644
> > --- a/tools/perf/Documentation/perf-top.txt
> > +++ b/tools/perf/Documentation/perf-top.txt
> > @@ -266,6 +266,10 @@ Default is to monitor all CPUS.
> > Record events of type PERF_RECORD_NAMESPACES and display it with the
> > 'cgroup_id' sort key.
> >
> > +--cgroup::
> > + Record events of type PERF_RECORD_CGROUP and display it with the
> > + 'cgroup' sort key.
>
> should be '--all-cgroups' ?

Oops, you're right.

>
> anyway, we dont have '--cgroups', why not use just this?

I chose it for consistency since perf record has '--cgroup' option.

Thanks
Namhyung