[PATCH 2/5] perf stat: Add --for-each-cgroup option

2020-09-24 Thread Namhyung Kim
The --for-each-cgroup option is a syntax sugar to monitor large number of cgroups easily. Current command line requires to list all the events and cgroups even if users want to monitor same events for each cgroup. This patch addresses that usage by copying given events for each cgroup on user's b

Re: [PATCH 2/5] perf stat: Add --for-each-cgroup option

2020-09-23 Thread Jiri Olsa
On Wed, Sep 23, 2020 at 07:51:33AM +0900, Namhyung Kim wrote: > On Wed, Sep 23, 2020 at 6:40 AM Jiri Olsa wrote: > > > > On Mon, Sep 21, 2020 at 06:46:07PM +0900, Namhyung Kim wrote: > > > > SNIP > > > > > +int evlist__expand_cgroup(struct evlist *evlist, const char *str) > > > +{ > > > + stru

[PATCH 2/5] perf stat: Add --for-each-cgroup option

2020-09-22 Thread Namhyung Kim
The --for-each-cgroup option is a syntax sugar to monitor large number of cgroups easily. Current command line requires to list all the events and cgroups even if users want to monitor same events for each cgroup. This patch addresses that usage by copying given events for each cgroup on user's b

Re: [PATCH 2/5] perf stat: Add --for-each-cgroup option

2020-09-22 Thread Namhyung Kim
On Mon, Sep 21, 2020 at 6:46 PM Namhyung Kim wrote: > > The --for-each-cgroup option is a syntax sugar to monitor large number > of cgroups easily. Current command line requires to list all the > events and cgroups even if users want to monitor same events for each > cgroup. This patch addresses

Re: [PATCH 2/5] perf stat: Add --for-each-cgroup option

2020-09-22 Thread Namhyung Kim
Hi Stephane, On Wed, Sep 23, 2020 at 6:52 AM Stephane Eranian wrote: > > Hi, > > On Mon, Sep 21, 2020 at 2:46 AM Namhyung Kim wrote: > > > > The --for-each-cgroup option is a syntax sugar to monitor large number > > of cgroups easily. Current command line requires to list all the > > events and

Re: [PATCH 2/5] perf stat: Add --for-each-cgroup option

2020-09-22 Thread Namhyung Kim
On Wed, Sep 23, 2020 at 6:40 AM Jiri Olsa wrote: > > On Mon, Sep 21, 2020 at 06:46:07PM +0900, Namhyung Kim wrote: > > SNIP > > > +int evlist__expand_cgroup(struct evlist *evlist, const char *str) > > +{ > > + struct evlist *orig_list, *tmp_list; > > + struct evsel *pos, *evsel, *leader; >

Re: [PATCH 2/5] perf stat: Add --for-each-cgroup option

2020-09-22 Thread Stephane Eranian
Hi, On Mon, Sep 21, 2020 at 2:46 AM Namhyung Kim wrote: > > The --for-each-cgroup option is a syntax sugar to monitor large number > of cgroups easily. Current command line requires to list all the > events and cgroups even if users want to monitor same events for each > cgroup. This patch addr

Re: [PATCH 2/5] perf stat: Add --for-each-cgroup option

2020-09-22 Thread Jiri Olsa
On Mon, Sep 21, 2020 at 06:46:07PM +0900, Namhyung Kim wrote: SNIP > +int evlist__expand_cgroup(struct evlist *evlist, const char *str) > +{ > + struct evlist *orig_list, *tmp_list; > + struct evsel *pos, *evsel, *leader; > + struct cgroup *cgrp = NULL; > + const char *p, *e, *eos

[PATCH 2/5] perf stat: Add --for-each-cgroup option

2020-09-21 Thread Namhyung Kim
The --for-each-cgroup option is a syntax sugar to monitor large number of cgroups easily. Current command line requires to list all the events and cgroups even if users want to monitor same events for each cgroup. This patch addresses that usage by copying given events for each cgroup on user's b