diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2018-11-05 02:35:05 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-11-05 12:53:54 -0500 |
commit | f6c23e3b55cb93f32a724f41af8d38888bc2ab6b (patch) | |
tree | 2f719879a904351a0494e78b0d81c78fb7310ca0 /tools/perf | |
parent | 93f8be2799515e01647c5a9b0d17a90a00ebcf82 (diff) |
perf intel-pt: Add MTC and CYC timestamps to debug log
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>
Link: http://lkml.kernel.org/r/20181105073505.8129-3-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) | |||
1474 | decoder->have_calc_cyc_to_tsc = false; | 1474 | decoder->have_calc_cyc_to_tsc = false; |
1475 | intel_pt_calc_cyc_to_tsc(decoder, true); | 1475 | intel_pt_calc_cyc_to_tsc(decoder, true); |
1476 | } | 1476 | } |
1477 | |||
1478 | intel_pt_log_to("Setting timestamp", decoder->timestamp); | ||
1477 | } | 1479 | } |
1478 | 1480 | ||
1479 | static void intel_pt_calc_cbr(struct intel_pt_decoder *decoder) | 1481 | 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) | |||
1514 | decoder->timestamp = timestamp; | 1516 | decoder->timestamp = timestamp; |
1515 | 1517 | ||
1516 | decoder->timestamp_insn_cnt = 0; | 1518 | decoder->timestamp_insn_cnt = 0; |
1519 | |||
1520 | intel_pt_log_to("Setting timestamp", decoder->timestamp); | ||
1517 | } | 1521 | } |
1518 | 1522 | ||
1519 | /* Walk PSB+ packets when already in sync. */ | 1523 | /* Walk PSB+ packets when already in sync. */ |