[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201026175349.GA2449445@kernel.org>
Date: Mon, 26 Oct 2020 14:53:49 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>, Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
LKML <linux-kernel@...r.kernel.org>,
Stephane Eranian <eranian@...gle.com>,
Andi Kleen <ak@...ux.intel.com>,
Ian Rogers <irogers@...gle.com>
Subject: Re: [PATCH v2 2/2] perf stat: Support regex pattern in
--for-each-cgroup
Em Mon, Oct 26, 2020 at 09:32:34PM +0900, Namhyung Kim escreveu:
> Hi Jiri,
>
> On Mon, Oct 26, 2020 at 8:40 PM Jiri Olsa <jolsa@...hat.com> wrote:
> >
> > On Sat, Oct 24, 2020 at 11:59:18AM +0900, Namhyung Kim wrote:
> > > To make the command line even more compact with cgroups, support regex
> > > pattern matching in cgroup names.
> > >
> > > $ perf stat -a -e cpu-clock,cycles --for-each-cgroup ^foo sleep 1
> > >
> > > 3,000.73 msec cpu-clock foo # 2.998 CPUs utilized
> > > 12,530,992,699 cycles foo # 7.517 GHz (100.00%)
> > > 1,000.61 msec cpu-clock foo/bar # 1.000 CPUs utilized
> > > 4,178,529,579 cycles foo/bar # 2.506 GHz (100.00%)
> > > 1,000.03 msec cpu-clock foo/baz # 0.999 CPUs utilized
> > > 4,176,104,315 cycles foo/baz # 2.505 GHz (100.00%)
> >
> > just curious.. there was another foo/XXX group using the
> > rest of the cycles, right?
>
> No, if so it should be displayed too. But actually there was a process
> in the foo cgroup itself.
>
> >
> > also perhaps we want to warn if there's no match found:
> >
> > $ sudo ./perf stat -a -e cpu-clock,cycles --for-each-cgroup ^foo sleep 1
> >
> > Performance counter stats for 'system wide':
> >
> >
> > 1.002375575 seconds time elapsed
> >
>
> Right, will check this case.
Hum, I thought that could be done on top of this one, but then, the
ambiguity of:
1. No samples for a cgroups matching that expression
2. No cgroups match that expression
Is real and warrants a warning for the 'no cgroups match the
--for-each-group regexp' case.
So I'll wait for v3 with that warning,
Thanks,
- Arnaldo
Powered by blists - more mailing lists