Re: [PATCH] perf report: Add support to display group output for non group events

From: Jiri Olsa
Date: Fri Feb 09 2018 - 14:11:07 EST


On Fri, Feb 09, 2018 at 03:37:11PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Feb 09, 2018 at 10:27:34AM +0100, Jiri Olsa escreveu:
> > On Wed, Feb 07, 2018 at 10:52:35AM -0800, Stephane Eranian wrote:
> >
> > SNIP
> >
> > > >> Similar to what I get if I do instead:
> > > >> $ perf record -e '{branches,branches,branches,branches}' my_test
> > > >> $ perf report --group
> > > >>
> > > >> But here, I would have to ensure all events fits in a group to allow
> > > >> the reporting
> > > >> I want. So that would limit me to 4 events.
> > > >>
> > > >> I think perf report --group should work regardless of how the events
> > > >> were grouped.
> > > >> Is there already a way to work around this?
> > > >
> > > > no workaround.. please try attached patch, it seems
> > > > to work for what you described
> > > >
> > > Works for me. That's great!
> > > Thanks.
> > >
> > > Tested-By: Stephane Eranian <eranian@xxxxxxxxxx>
> >
> > thanks, full patch attached
> >
> > jirka
>
> Humm, its a nice hack, but it would be even better if it didn't showed
> it as if it was really a group:
>
> Samples: 20 of event 'anon group { cycles, instructions }', Event count (approx.): 4712980
>
> It would be better to instead add another condition to the evlist that
> would trigger the view with all the examples...
>
> I'm applying it anyway, as it is useful, but would be nice to have the
> same output except for that header, that should read instead:
>
> Samples: 20 of non grouped events: cycles, instructions, Event count (approx.): 4712980

right, I'll try to post something like that

thanks,
jirka