perf auxtrace: Automatically group aux-output events
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 21 Jan 2021 14:04:18 +0000 (16:04 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 18 Feb 2021 19:11:19 +0000 (16:11 -0300)
commitd58b3f7e701408ac41b0a8342f26bbf9a5597f05
treed0f47742e433d24c0ad553ca22f2a97189dfef2c
parentc5c97cadd7ed13381cb6b4bef5c841a66938d350
perf auxtrace: Automatically group aux-output events

aux-output events need to have an AUX area event as the group leader.
However, grouping events does not allow the AUX area event to be given
an address filter because the --filter option must come after the event,
which conflicts with the grouping syntax.

To allow filtering in that case, automatically create a group since that
is the requirement anyway.

Example: (requires Intel Tremont)

  perf record -c 500 -e 'intel_pt//u' --filter 'filter main @ /bin/ls' -e 'cycles/aux-output/pp' ls

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20210121140418.14705-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-record.c
tools/perf/util/auxtrace.c
tools/perf/util/auxtrace.h