]> git.baikalelectronics.ru Git - kernel.git/commit
perf intel-pt: Fix IPC with CYC threshold
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 5 Feb 2021 17:53:49 +0000 (19:53 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 18 Feb 2021 19:03:54 +0000 (16:03 -0300)
commit206299c5638f799782443a39df6a86a2f73e9512
treea75e9208eb4e51cef3c05662bcac00f9d0f571ff
parent62a7ca5a9c7f9de5d352c8165301d0167ba641dc
perf intel-pt: Fix IPC with CYC threshold

The code assumed every CYC-eligible packet has a CYC packet, which is not
the case when CYC thresholds are used. Fix by checking if a CYC packet is
actually present in that case.

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>
Link: https://lore.kernel.org/r/20210205175350.23817-4-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