]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.4.177/perf-intel-pt-fix-cyc-timestamp-calculation-after-ovf.patch
Linux 4.4.177
[thirdparty/kernel/stable-queue.git] / releases / 4.4.177 / perf-intel-pt-fix-cyc-timestamp-calculation-after-ovf.patch
CommitLineData
90a0f3ad
GKH
1From 03997612904866abe7cdcc992784ef65cb3a4b81 Mon Sep 17 00:00:00 2001
2From: Adrian Hunter <adrian.hunter@intel.com>
3Date: Wed, 6 Feb 2019 12:39:45 +0200
4Subject: perf intel-pt: Fix CYC timestamp calculation after OVF
5
6From: Adrian Hunter <adrian.hunter@intel.com>
7
8commit 03997612904866abe7cdcc992784ef65cb3a4b81 upstream.
9
10CYC packet timestamp calculation depends upon CBR which was being
11cleared upon overflow (OVF). That can cause errors due to failing to
12synchronize with sideband events. Even if a CBR change has been lost,
13the old CBR is still a better estimate than zero. So remove the clearing
14of CBR.
15
16Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
17Cc: Jiri Olsa <jolsa@redhat.com>
18Cc: stable@vger.kernel.org
19Link: http://lkml.kernel.org/r/20190206103947.15750-4-adrian.hunter@intel.com
20Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23---
24 tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 1 -
25 1 file changed, 1 deletion(-)
26
27--- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
28+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
29@@ -1281,7 +1281,6 @@ static int intel_pt_overflow(struct inte
30 {
31 intel_pt_log("ERROR: Buffer overflow\n");
32 intel_pt_clear_tx_flags(decoder);
33- decoder->cbr = 0;
34 decoder->timestamp_insn_cnt = 0;
35 decoder->pkt_state = INTEL_PT_STATE_ERR_RESYNC;
36 decoder->overflow = true;