perf intel-pt: Adjust sample flags for VM-Exit
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 18 Feb 2021 09:57:59 +0000 (11:57 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 18 Feb 2021 19:15:26 +0000 (16:15 -0300)
commit695fc4510615f8db40ebaf7a2c011f0a594b5f77
tree04c27d54368c72332960d4ed4457d03a2a8805d9
parent65faca5ce8629495092e9ef0731a31a6b7d9234f
perf intel-pt: Adjust sample flags for VM-Exit

Use the change of NR to detect whether an asynchronous branch is a VM-Exit.

Note VM-Entry is determined from the vmlaunch or vmresume instruction,
in which case, sample flags will show "VMentry" even if the VM-Entry fails.

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