Skip to content

Commit f6c23e3

Browse files
ahunter6acmel
authored andcommitted
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>
1 parent 93f8be2 commit f6c23e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/perf/util/intel-pt-decoder/intel-pt-decoder.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,8 @@ static void intel_pt_calc_mtc_timestamp(struct intel_pt_decoder *decoder)
14741474
decoder->have_calc_cyc_to_tsc = false;
14751475
intel_pt_calc_cyc_to_tsc(decoder, true);
14761476
}
1477+
1478+
intel_pt_log_to("Setting timestamp", decoder->timestamp);
14771479
}
14781480

14791481
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)
15141516
decoder->timestamp = timestamp;
15151517

15161518
decoder->timestamp_insn_cnt = 0;
1519+
1520+
intel_pt_log_to("Setting timestamp", decoder->timestamp);
15171521
}
15181522

15191523
/* Walk PSB+ packets when already in sync. */

0 commit comments

Comments
 (0)