Re: [PATCH 3/5] perf tools: Copy metric events properly when expand cgroups

Jiri Olsa
2020-09-25T13:51:50Z

On Fri, Sep 25, 2020 at 10:44:53PM +0900, Namhyung Kim wrote:
> On Fri, Sep 25, 2020 at 10:26 PM Jiri Olsa <jolsa@redhat.com> wrote:
> >
> > On Thu, Sep 24, 2020 at 09:44:53PM +0900, Namhyung Kim wrote:
> >
> > SNIP
> >
> > >
> > > + if (metric_events) {
> > > + orig_metric_events = *metric_events;
> > > + rblist__init(metric_events);
> > > + } else {
> > > + rblist__init(&orig_metric_events);
> > > + }
> > > +
> > > for (;;) {
> > > p = strchr(str, ',');
> > > e = p ? p : eos;
> > > @@ -255,6 +267,14 @@ int evlist__expand_cgroup(struct evlist *evlist, const char *str)
> > > cgroup__put(cgrp);
> > > nr_cgroups++;
> > >
> > > + if (metric_events) {
> > > + perf_stat__collect_metric_expr(tmp_list);
> > > + if (metricgroup__copy_metric_events(tmp_list, cgrp,
> > > + metric_events,
> > > + &orig_metric_events) < 0)
> > > + break;
> > > + }
> >
> > looks good, do you plan to actualy add support for record?
>
> No actually, I still think perf record should use --all-cgroups.
>
> > my ack from last version stays
>
> Thanks! But I didn't see your ack for this patch set.
> (I've only seen it for the perf inject patchset..)

ah that was for the build id inject speed up.. too many
patchsets flying around ;-)

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka