From: Adrian Hunter <adrian.hunter@intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] perf intel-pt: Add MTC and CYC timestamps to debug log
Date: Mon, 5 Nov 2018 09:35:05 +0200 [thread overview]
Message-ID: <20181105073505.8129-3-adrian.hunter@intel.com> (raw)
In-Reply-To: <20181105073505.8129-1-adrian.hunter@intel.com>
One cause of decoding errors is un-synchronized side-band data. Timestamps
are needed to debug such cases. TSC packet timestamps are logged. Log also
MTC and CYC timestamps.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 4 ++++
1 file changed, 4 insertions(+)
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 58f6a9ceb590..4503f3ca45ab 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
@@ -1474,6 +1474,8 @@ static void intel_pt_calc_mtc_timestamp(struct intel_pt_decoder *decoder)
decoder->have_calc_cyc_to_tsc = false;
intel_pt_calc_cyc_to_tsc(decoder, true);
}
+
+ intel_pt_log_to("Setting timestamp", decoder->timestamp);
}
static void intel_pt_calc_cbr(struct intel_pt_decoder *decoder)
@@ -1514,6 +1516,8 @@ static void intel_pt_calc_cyc_timestamp(struct intel_pt_decoder *decoder)
decoder->timestamp = timestamp;
decoder->timestamp_insn_cnt = 0;
+
+ intel_pt_log_to("Setting timestamp", decoder->timestamp);
}
/* Walk PSB+ packets when already in sync. */
--
2.17.1
next prev parent reply other threads:[~2018-11-05 7:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-05 7:35 [PATCH 0/2] perf intel-pt: Add more information to debug log Adrian Hunter
2018-11-05 7:35 ` [PATCH 1/2] perf intel-pt: Add more event " Adrian Hunter
2018-11-06 19:17 ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-11-05 7:35 ` Adrian Hunter [this message]
2018-11-06 19:18 ` [tip:perf/urgent] perf intel-pt: Add MTC and CYC timestamps " tip-bot for Adrian Hunter
2018-11-05 17:54 ` [PATCH 0/2] perf intel-pt: Add more information " Arnaldo Carvalho de Melo
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=20181105073505.8129-3-adrian.hunter@intel.com \
--to=adrian.hunter@intel.com \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).