]>
Commit | Line | Data |
---|---|---|
90a0f3ad GKH |
1 | From 03997612904866abe7cdcc992784ef65cb3a4b81 Mon Sep 17 00:00:00 2001 |
2 | From: Adrian Hunter <adrian.hunter@intel.com> | |
3 | Date: Wed, 6 Feb 2019 12:39:45 +0200 | |
4 | Subject: perf intel-pt: Fix CYC timestamp calculation after OVF | |
5 | ||
6 | From: Adrian Hunter <adrian.hunter@intel.com> | |
7 | ||
8 | commit 03997612904866abe7cdcc992784ef65cb3a4b81 upstream. | |
9 | ||
10 | CYC packet timestamp calculation depends upon CBR which was being | |
11 | cleared upon overflow (OVF). That can cause errors due to failing to | |
12 | synchronize with sideband events. Even if a CBR change has been lost, | |
13 | the old CBR is still a better estimate than zero. So remove the clearing | |
14 | of CBR. | |
15 | ||
16 | Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> | |
17 | Cc: Jiri Olsa <jolsa@redhat.com> | |
18 | Cc: stable@vger.kernel.org | |
19 | Link: http://lkml.kernel.org/r/20190206103947.15750-4-adrian.hunter@intel.com | |
20 | Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | |
21 | Signed-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; |