]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
perf intel-pt: Fix missing CYC processing in PSB
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 5 Feb 2021 17:53:47 +0000 (19:53 +0200)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 15 Mar 2021 14:09:28 +0000 (15:09 +0100)
[ Upstream commit 03fb0f859b45d1eb05c984ab4bd3bef67e45ede2 ]

Add missing CYC packet processing when walking through PSB+. This
improves the accuracy of timestamps that follow PSB+, until the next
MTC.

Fixes: 3d49807870f08 ("perf tools: Add new Intel PT packet definitions")
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-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c

index 697513f3515499e545b07e0b64fe721ba8839b36..91cba058273699e0fbdcf62734ac2365890302f4 100644 (file)
@@ -1761,6 +1761,9 @@ static int intel_pt_walk_psbend(struct intel_pt_decoder *decoder)
                        break;
 
                case INTEL_PT_CYC:
+                       intel_pt_calc_cyc_timestamp(decoder);
+                       break;
+
                case INTEL_PT_VMCS:
                case INTEL_PT_MNT:
                case INTEL_PT_PAD: