linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Adrian Hunter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: adrian.hunter@intel.com, mingo@kernel.org,
	linux-kernel@vger.kernel.org, tglx@linutronix.de,
	jolsa@redhat.com, hpa@zytor.com, acme@redhat.com
Subject: [tip:perf/core] perf intel-pt: Fix CYC timestamp calculation after OVF
Date: Sat, 9 Feb 2019 05:01:31 -0800	[thread overview]
Message-ID: <tip-03997612904866abe7cdcc992784ef65cb3a4b81@git.kernel.org> (raw)
In-Reply-To: <20190206103947.15750-4-adrian.hunter@intel.com>

Commit-ID:  03997612904866abe7cdcc992784ef65cb3a4b81
Gitweb:     https://git.kernel.org/tip/03997612904866abe7cdcc992784ef65cb3a4b81
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Wed, 6 Feb 2019 12:39:45 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 6 Feb 2019 10:27:27 -0300

perf intel-pt: Fix CYC timestamp calculation after OVF

CYC packet timestamp calculation depends upon CBR which was being
cleared upon overflow (OVF). That can cause errors due to failing to
synchronize with sideband events. Even if a CBR change has been lost,
the old CBR is still a better estimate than zero. So remove the clearing
of CBR.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20190206103947.15750-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 | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
index ecd25cdc1d3e..a54d6c9a4601 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
@@ -1395,7 +1395,6 @@ static int intel_pt_overflow(struct intel_pt_decoder *decoder)
 {
 	intel_pt_log("ERROR: Buffer overflow\n");
 	intel_pt_clear_tx_flags(decoder);
-	decoder->cbr = 0;
 	decoder->timestamp_insn_cnt = 0;
 	decoder->pkt_state = INTEL_PT_STATE_ERR_RESYNC;
 	decoder->overflow = true;

  reply	other threads:[~2019-02-09 13:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 10:39 [PATCH 0/5] perf intel-pt: A few fixes Adrian Hunter
2019-02-06 10:39 ` [PATCH 1/5] perf auxtrace: Define auxtrace record alignment Adrian Hunter
2019-02-09 13:00   ` [tip:perf/core] " tip-bot for Adrian Hunter
2019-02-06 10:39 ` [PATCH 2/5] perf intel-pt: Fix overlap calculation for padding Adrian Hunter
2019-02-09 13:00   ` [tip:perf/core] " tip-bot for Adrian Hunter
2019-02-06 10:39 ` [PATCH 3/5] perf intel-pt: Fix CYC timestamp calculation after OVF Adrian Hunter
2019-02-09 13:01   ` tip-bot for Adrian Hunter [this message]
2019-02-06 10:39 ` [PATCH 4/5] perf intel-pt: Packet splitting can happen only on 32-bit Adrian Hunter
2019-02-09 13:02   ` [tip:perf/core] " tip-bot for Adrian Hunter
2019-02-06 10:39 ` [PATCH 5/5] perf auxtrace: Add timestamp to auxtrace errors Adrian Hunter
2019-02-09 13:02   ` [tip:perf/core] " tip-bot for Adrian Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-03997612904866abe7cdcc992784ef65cb3a4b81@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).