lkml.org 
[lkml]   [2020]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2020-10-27 06:00    [W:0.074 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site