Lines Matching refs:timestamp
117 uint64_t timestamp; member
490 decoder->sample_timestamp = decoder->timestamp; in intel_pt_update_sample_time()
498 decoder->timestamp = 0; in intel_pt_reposition()
647 uint64_t timestamp; member
678 uint64_t timestamp; in intel_pt_calc_cyc_cb() local
722 timestamp = data->ctc_timestamp + in intel_pt_calc_cyc_cb()
725 timestamp = data->ctc_timestamp + in intel_pt_calc_cyc_cb()
731 if (timestamp < data->timestamp) in intel_pt_calc_cyc_cb()
735 data->timestamp = timestamp; in intel_pt_calc_cyc_cb()
748 timestamp = pkt_info->packet.payload | in intel_pt_calc_cyc_cb()
749 (data->timestamp & (0xffULL << 56)); in intel_pt_calc_cyc_cb()
750 if (data->from_mtc && timestamp < data->timestamp && in intel_pt_calc_cyc_cb()
751 data->timestamp - timestamp < decoder->tsc_slip) in intel_pt_calc_cyc_cb()
753 if (timestamp < data->timestamp) in intel_pt_calc_cyc_cb()
754 timestamp += (1ULL << 56); in intel_pt_calc_cyc_cb()
758 data->tsc_timestamp = timestamp; in intel_pt_calc_cyc_cb()
759 data->timestamp = timestamp; in intel_pt_calc_cyc_cb()
825 cyc_to_tsc = (double)(timestamp - decoder->timestamp) / data->cycle_cnt; in intel_pt_calc_cyc_cb()
858 .timestamp = decoder->timestamp, in intel_pt_calc_cyc_to_tsc()
915 uint64_t timestamp, masked_timestamp; in intel_pt_next_period() local
917 timestamp = decoder->timestamp + decoder->timestamp_insn_cnt; in intel_pt_next_period()
918 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_next_period()
923 timestamp += 1; in intel_pt_next_period()
924 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_next_period()
934 return decoder->period_ticks - (timestamp - masked_timestamp); in intel_pt_next_period()
953 uint64_t timestamp, masked_timestamp; in intel_pt_sample_insn() local
960 timestamp = decoder->timestamp + decoder->timestamp_insn_cnt; in intel_pt_sample_insn()
961 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_sample_insn()
1392 static uint64_t intel_pt_8b_tsc(uint64_t timestamp, uint64_t ref_timestamp) in intel_pt_8b_tsc() argument
1394 timestamp |= (ref_timestamp & (0xffULL << 56)); in intel_pt_8b_tsc()
1396 if (timestamp < ref_timestamp) { in intel_pt_8b_tsc()
1397 if (ref_timestamp - timestamp > (1ULL << 55)) in intel_pt_8b_tsc()
1398 timestamp += (1ULL << 56); in intel_pt_8b_tsc()
1400 if (timestamp - ref_timestamp > (1ULL << 55)) in intel_pt_8b_tsc()
1401 timestamp -= (1ULL << 56); in intel_pt_8b_tsc()
1404 return timestamp; in intel_pt_8b_tsc()
1409 uint64_t timestamp; in intel_pt_calc_tsc_timestamp() local
1414 timestamp = intel_pt_8b_tsc(decoder->packet.payload, in intel_pt_calc_tsc_timestamp()
1416 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1417 decoder->timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1420 } else if (decoder->timestamp) { in intel_pt_calc_tsc_timestamp()
1421 timestamp = decoder->packet.payload | in intel_pt_calc_tsc_timestamp()
1422 (decoder->timestamp & (0xffULL << 56)); in intel_pt_calc_tsc_timestamp()
1423 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1424 if (timestamp < decoder->timestamp && in intel_pt_calc_tsc_timestamp()
1425 decoder->timestamp - timestamp < decoder->tsc_slip) { in intel_pt_calc_tsc_timestamp()
1427 timestamp); in intel_pt_calc_tsc_timestamp()
1428 timestamp = decoder->timestamp; in intel_pt_calc_tsc_timestamp()
1430 if (timestamp < decoder->timestamp) { in intel_pt_calc_tsc_timestamp()
1431 intel_pt_log_to("Wraparound timestamp", timestamp); in intel_pt_calc_tsc_timestamp()
1432 timestamp += (1ULL << 56); in intel_pt_calc_tsc_timestamp()
1433 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1435 decoder->timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1440 decoder->cyc_ref_timestamp = decoder->timestamp; in intel_pt_calc_tsc_timestamp()
1446 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_tsc_timestamp()
1464 decoder->cyc_cnt_timestamp = decoder->timestamp; in intel_pt_mtc_cyc_cnt_pge()
1485 if (!decoder->pge || decoder->timestamp <= decoder->cyc_cnt_timestamp) in intel_pt_mtc_cyc_cnt_upd()
1488 tsc_delta = decoder->timestamp - decoder->cyc_cnt_timestamp; in intel_pt_mtc_cyc_cnt_upd()
1527 uint64_t timestamp; in intel_pt_calc_mtc_timestamp() local
1549 timestamp = decoder->ctc_timestamp + in intel_pt_calc_mtc_timestamp()
1552 timestamp = decoder->ctc_timestamp + in intel_pt_calc_mtc_timestamp()
1558 if (timestamp < decoder->timestamp) in intel_pt_calc_mtc_timestamp()
1560 timestamp, decoder->timestamp); in intel_pt_calc_mtc_timestamp()
1562 decoder->timestamp = timestamp; in intel_pt_calc_mtc_timestamp()
1570 decoder->cyc_ref_timestamp = decoder->timestamp; in intel_pt_calc_mtc_timestamp()
1576 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_mtc_timestamp()
1596 uint64_t timestamp = decoder->cyc_ref_timestamp; in intel_pt_calc_cyc_timestamp() local
1609 timestamp += decoder->cycle_cnt * decoder->calc_cyc_to_tsc; in intel_pt_calc_cyc_timestamp()
1611 timestamp += decoder->cycle_cnt * decoder->cbr_cyc_to_tsc; in intel_pt_calc_cyc_timestamp()
1615 if (timestamp < decoder->timestamp) in intel_pt_calc_cyc_timestamp()
1617 timestamp, decoder->timestamp); in intel_pt_calc_cyc_timestamp()
1619 decoder->timestamp = timestamp; in intel_pt_calc_cyc_timestamp()
1623 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_cyc_timestamp()
2003 if (!decoder->timestamp) in intel_pt_walk_trace()
2645 decoder->state.timestamp = decoder->sample_timestamp; in intel_pt_decode()
2968 uint64_t timestamp; member
3006 if (tsc < d->timestamp) in intel_pt_ff_cb()
3023 int intel_pt_fast_forward(struct intel_pt_decoder *decoder, uint64_t timestamp) in intel_pt_fast_forward() argument
3025 struct fast_forward_data d = { .timestamp = timestamp }; in intel_pt_fast_forward()
3030 intel_pt_log("Fast forward towards timestamp " x64_fmt "\n", timestamp); in intel_pt_fast_forward()
3075 if (tsc < timestamp) { in intel_pt_fast_forward()