Messages in this thread | | | From | Namhyung Kim <> | Date | Tue, 27 Oct 2020 14:00:33 +0900 | Subject | Re: [PATCH v2 2/2] perf stat: Support regex pattern in --for-each-cgroup |
| |
Hi Arnaldo,
On Tue, Oct 27, 2020 at 2:53 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > 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@redhat.com> wrote: > > > 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.
The 1 will be handled by perf stat showing <not counted> and I'll add a warning for the item 2 like below:
# perf stat -a -e cycles --for-each-cgroup ^foo sleep 1 no cgroup matched: ^foo
Usage: perf stat [<options>] [<command>]
--for-each-cgroup <name> expand events for each cgroup
Thanks Namhyung
| |