perf intel-pt: Add support for samples to contain IPC ratio
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 20 May 2019 11:37:13 +0000 (14:37 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 5 Jun 2019 12:47:56 +0000 (09:47 -0300)
commit5b1dc0fd1da06d6e89f1ca8736cfe0ee84e34cc7
treef26b54691badf4c122837377ac317bb267362eff
parent61d276f428a11f0e4ce5203462fa488e6570684f
perf intel-pt: Add support for samples to contain IPC ratio

Copy the incremental instruction count and cycle count onto 'instructions'
and 'branches' samples.

Because Intel PT does not update the cycle count on every branch or
instruction, the incremental values will often be zero.

When there are values, they will be the number of instructions and
number of cycles since the last update, and thus represent the average
IPC since the last IPC value.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190520113728.14389-8-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/intel-pt.c