Lines Matching full:timestamp
124 uint64_t timestamp; member
259 * A TSC packet can slip past MTC packets so that the timestamp appears in intel_pt_decoder_new()
266 intel_pt_log("timestamp: mtc_shift %u\n", decoder->mtc_shift); in intel_pt_decoder_new()
267 intel_pt_log("timestamp: tsc_ctc_ratio_n %u\n", decoder->tsc_ctc_ratio_n); in intel_pt_decoder_new()
268 intel_pt_log("timestamp: tsc_ctc_ratio_d %u\n", decoder->tsc_ctc_ratio_d); in intel_pt_decoder_new()
269 intel_pt_log("timestamp: tsc_ctc_mult %u\n", decoder->tsc_ctc_mult); in intel_pt_decoder_new()
270 intel_pt_log("timestamp: tsc_slip %#x\n", decoder->tsc_slip); in intel_pt_decoder_new()
503 decoder->timestamp = 0; in intel_pt_get_data()
506 intel_pt_log("Reference timestamp 0x%" PRIx64 "\n", in intel_pt_get_data()
625 uint64_t timestamp; member
656 uint64_t timestamp; in intel_pt_calc_cyc_cb() local
696 timestamp = data->ctc_timestamp + in intel_pt_calc_cyc_cb()
699 timestamp = data->ctc_timestamp + in intel_pt_calc_cyc_cb()
705 if (timestamp < data->timestamp) in intel_pt_calc_cyc_cb()
709 data->timestamp = timestamp; in intel_pt_calc_cyc_cb()
722 timestamp = pkt_info->packet.payload | in intel_pt_calc_cyc_cb()
723 (data->timestamp & (0xffULL << 56)); in intel_pt_calc_cyc_cb()
724 if (data->from_mtc && timestamp < data->timestamp && in intel_pt_calc_cyc_cb()
725 data->timestamp - timestamp < decoder->tsc_slip) in intel_pt_calc_cyc_cb()
727 if (timestamp < data->timestamp) in intel_pt_calc_cyc_cb()
728 timestamp += (1ULL << 56); in intel_pt_calc_cyc_cb()
732 data->tsc_timestamp = timestamp; in intel_pt_calc_cyc_cb()
733 data->timestamp = timestamp; in intel_pt_calc_cyc_cb()
799 cyc_to_tsc = (double)(timestamp - decoder->timestamp) / data->cycle_cnt; in intel_pt_calc_cyc_cb()
803 …intel_pt_log("Timestamp: calculated %g TSC ticks per cycle too big (c.f. CBR-based value %g), pos … in intel_pt_calc_cyc_cb()
812 …intel_pt_log("Timestamp: calculated %g TSC ticks per cycle c.f. CBR-based value %g, pos " x64_fmt … in intel_pt_calc_cyc_cb()
815 …intel_pt_log("Timestamp: calculated %g TSC ticks per cycle c.f. unknown CBR-based value, pos " x64… in intel_pt_calc_cyc_cb()
832 .timestamp = decoder->timestamp, in intel_pt_calc_cyc_to_tsc()
888 uint64_t timestamp, masked_timestamp; in intel_pt_next_period() local
890 timestamp = decoder->timestamp + decoder->timestamp_insn_cnt; in intel_pt_next_period()
891 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_next_period()
896 timestamp += 1; in intel_pt_next_period()
897 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_next_period()
907 return decoder->period_ticks - (timestamp - masked_timestamp); in intel_pt_next_period()
926 uint64_t timestamp, masked_timestamp; in intel_pt_sample_insn() local
933 timestamp = decoder->timestamp + decoder->timestamp_insn_cnt; in intel_pt_sample_insn()
934 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_sample_insn()
1318 decoder->sample_timestamp = decoder->timestamp; in intel_pt_walk_tnt()
1355 uint64_t timestamp; in intel_pt_calc_tsc_timestamp() local
1360 timestamp = decoder->packet.payload | in intel_pt_calc_tsc_timestamp()
1362 if (timestamp < decoder->ref_timestamp) { in intel_pt_calc_tsc_timestamp()
1363 if (decoder->ref_timestamp - timestamp > (1ULL << 55)) in intel_pt_calc_tsc_timestamp()
1364 timestamp += (1ULL << 56); in intel_pt_calc_tsc_timestamp()
1366 if (timestamp - decoder->ref_timestamp > (1ULL << 55)) in intel_pt_calc_tsc_timestamp()
1367 timestamp -= (1ULL << 56); in intel_pt_calc_tsc_timestamp()
1369 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1370 decoder->timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1373 } else if (decoder->timestamp) { in intel_pt_calc_tsc_timestamp()
1374 timestamp = decoder->packet.payload | in intel_pt_calc_tsc_timestamp()
1375 (decoder->timestamp & (0xffULL << 56)); in intel_pt_calc_tsc_timestamp()
1376 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1377 if (timestamp < decoder->timestamp && in intel_pt_calc_tsc_timestamp()
1378 decoder->timestamp - timestamp < decoder->tsc_slip) { in intel_pt_calc_tsc_timestamp()
1379 intel_pt_log_to("Suppressing backwards timestamp", in intel_pt_calc_tsc_timestamp()
1380 timestamp); in intel_pt_calc_tsc_timestamp()
1381 timestamp = decoder->timestamp; in intel_pt_calc_tsc_timestamp()
1383 if (timestamp < decoder->timestamp) { in intel_pt_calc_tsc_timestamp()
1384 intel_pt_log_to("Wraparound timestamp", timestamp); in intel_pt_calc_tsc_timestamp()
1385 timestamp += (1ULL << 56); in intel_pt_calc_tsc_timestamp()
1386 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1388 decoder->timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1393 decoder->cyc_ref_timestamp = decoder->timestamp; in intel_pt_calc_tsc_timestamp()
1399 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_tsc_timestamp()
1433 intel_pt_log("CTC timestamp " x64_fmt " last MTC %#x CTC rem %#x\n", in intel_pt_calc_tma()
1439 uint64_t timestamp; in intel_pt_calc_mtc_timestamp() local
1461 timestamp = decoder->ctc_timestamp + in intel_pt_calc_mtc_timestamp()
1464 timestamp = decoder->ctc_timestamp + in intel_pt_calc_mtc_timestamp()
1470 if (timestamp < decoder->timestamp) in intel_pt_calc_mtc_timestamp()
1471 intel_pt_log("Suppressing MTC timestamp " x64_fmt " less than current timestamp " x64_fmt "\n", in intel_pt_calc_mtc_timestamp()
1472 timestamp, decoder->timestamp); in intel_pt_calc_mtc_timestamp()
1474 decoder->timestamp = timestamp; in intel_pt_calc_mtc_timestamp()
1480 decoder->cyc_ref_timestamp = decoder->timestamp; in intel_pt_calc_mtc_timestamp()
1502 uint64_t timestamp = decoder->cyc_ref_timestamp; in intel_pt_calc_cyc_timestamp() local
1512 timestamp += decoder->cycle_cnt * decoder->calc_cyc_to_tsc; in intel_pt_calc_cyc_timestamp()
1514 timestamp += decoder->cycle_cnt * decoder->cbr_cyc_to_tsc; in intel_pt_calc_cyc_timestamp()
1518 if (timestamp < decoder->timestamp) in intel_pt_calc_cyc_timestamp()
1519 intel_pt_log("Suppressing CYC timestamp " x64_fmt " less than current timestamp " x64_fmt "\n", in intel_pt_calc_cyc_timestamp()
1520 timestamp, decoder->timestamp); in intel_pt_calc_cyc_timestamp()
1522 decoder->timestamp = timestamp; in intel_pt_calc_cyc_timestamp()
1830 /* Ensure that there is a timestamp */ in intel_pt_walk_trace()
1831 if (!decoder->timestamp) in intel_pt_walk_trace()
2393 decoder->sample_timestamp = decoder->timestamp; in intel_pt_decode()
2403 decoder->sample_timestamp = decoder->timestamp; in intel_pt_decode()
2408 decoder->state.timestamp = decoder->sample_timestamp; in intel_pt_decode()