Re: [PATCH v2] perf evsel: Adjust hybrid event and global event mixed group

From: Arnaldo Carvalho de Melo
Date: Thu Jun 10 2021 - 12:43:39 EST


Em Wed, Jun 09, 2021 at 10:15:29PM +0200, Jiri Olsa escreveu:
> On Wed, Jun 09, 2021 at 12:45:55PM +0800, Jin Yao wrote:
> > A group mixed with hybrid event and global event is allowed. For example,
> > group leader is 'intel_pt//' and the group member is 'cpu_atom/cycles/'.
> >
> > e.g.
> > perf record --aux-sample -e '{intel_pt//,cpu_atom/cycles/}:u'
> >
> > The challenge is their available cpus are not fully matched. For example,
> > 'intel_pt//' is available on CPU0-CPU23, but 'cpu_atom/cycles/' is
> > available on CPU16-CPU23.
> >
> > When getting the group id for group member, we must be very careful.
> > Because the cpu for 'intel_pt//' is not equal to the cpu for
> > 'cpu_atom/cycles/'. Actually the cpu here is the index of evsel->core.cpus,
> > not the real CPU ID.

<SNIP>

> > Signed-off-by: Jin Yao <yao.jin@xxxxxxxxxxxxxxx>

> looks good to me

> Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>

Thanks, applied.

- Arnaldo