All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Stephane Eranian <eranian@google.com>,
	Andi Kleen <ak@linux.intel.com>, Ian Rogers <irogers@google.com>
Subject: Re: [PATCH v2 2/2] perf stat: Support regex pattern in --for-each-cgroup
Date: Mon, 26 Oct 2020 14:53:49 -0300	[thread overview]
Message-ID: <20201026175349.GA2449445@kernel.org> (raw)
In-Reply-To: <CAM9d7chdStkY7-tRjw9Fo+3wKdhrDYAkbNT0b-g6ftGoaZfMDQ@mail.gmail.com>

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:
> >
> > 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

  parent reply	other threads:[~2020-10-26 17:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-24  2:59 [PATCH 1/2] perf test: Use generic event for expand_libpfm_events() Namhyung Kim
2020-10-24  2:59 ` [PATCH v2 2/2] perf stat: Support regex pattern in --for-each-cgroup Namhyung Kim
2020-10-26 11:40   ` Jiri Olsa
2020-10-26 12:32     ` Namhyung Kim
2020-10-26 13:12       ` Jiri Olsa
2020-10-26 17:53       ` Arnaldo Carvalho de Melo [this message]
2020-10-27  5:00         ` Namhyung Kim
2020-10-25  5:30 ` [PATCH 1/2] perf test: Use generic event for expand_libpfm_events() Andi Kleen
2020-10-26 15:40 ` Ian Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201026175349.GA2449445@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.