perf intel-pt: Synthesize CFE (Control Flow Event) / EVD (Event Data) event
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 24 Jan 2022 08:41:50 +0000 (10:41 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 15 Feb 2022 20:12:13 +0000 (17:12 -0300)
commitef3b2ba9640d0e1e6991b8a5c0ddece2fc3e4d23
tree1d9e03b6aa4a3b22cf2002d300c5273a6ca2b43b
parentf2be829e72f90e6d83923398a861f0aaa74952ee
perf intel-pt: Synthesize CFE (Control Flow Event) / EVD (Event Data) event

Synthesize an attribute event and sample events for Intel PT Event Trace
events represented by CFE and EVD packets.

Committer notes:

Make 'struct perf_synth_intel_evd evd[]' evd[0] at the end of 'struct
perf_synth_intel_evt' as it is breaking the build with in many compilers
with (e.g. clang version 13.0.0 (Fedora 13.0.0-3.fc35)):

  util/intel-pt.c:2213:31: error: field 'cfe' with variable sized type 'struct perf_synth_intel_evt' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
                  struct perf_synth_intel_evt cfe;
                                              ^

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/r/20220124084201.2699795-15-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/event.h
tools/perf/util/intel-pt.c