]> git.baikalelectronics.ru Git - kernel.git/commit
perf intel-pt: Fix premature IPC
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 5 Feb 2021 17:53:48 +0000 (19:53 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 18 Feb 2021 19:03:37 +0000 (16:03 -0300)
commit62a7ca5a9c7f9de5d352c8165301d0167ba641dc
tree66de40f6014defdcb5cfc0153ba30bf2164ff433
parent5eb591e777c7497f657ffde81f0c5e7c65b5be16
perf intel-pt: Fix premature IPC

The code assumed a change in cycle count means accurate IPC. That is not
correct, for example when sampling both branches and instructions, or at
a FUP packet (which is not CYC-eligible) address. Fix by using an explicit
flag to indicate when IPC can be sampled.

Fixes: 6a1468c687538 ("perf intel-pt: Add support for samples to contain IPC ratio")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/20210205175350.23817-3-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
tools/perf/util/intel-pt-decoder/intel-pt-decoder.h
tools/perf/util/intel-pt.c