Lines Matching refs:timestamp

122 	uint64_t timestamp;  member
500 decoder->sample_timestamp = decoder->timestamp; in intel_pt_update_sample_time()
508 decoder->timestamp = 0; in intel_pt_reposition()
657 uint64_t timestamp; member
688 uint64_t timestamp; in intel_pt_calc_cyc_cb() local
732 timestamp = data->ctc_timestamp + in intel_pt_calc_cyc_cb()
735 timestamp = data->ctc_timestamp + in intel_pt_calc_cyc_cb()
741 if (timestamp < data->timestamp) in intel_pt_calc_cyc_cb()
745 data->timestamp = timestamp; in intel_pt_calc_cyc_cb()
758 timestamp = pkt_info->packet.payload | in intel_pt_calc_cyc_cb()
759 (data->timestamp & (0xffULL << 56)); in intel_pt_calc_cyc_cb()
760 if (data->from_mtc && timestamp < data->timestamp && in intel_pt_calc_cyc_cb()
761 data->timestamp - timestamp < decoder->tsc_slip) in intel_pt_calc_cyc_cb()
763 if (timestamp < data->timestamp) in intel_pt_calc_cyc_cb()
764 timestamp += (1ULL << 56); in intel_pt_calc_cyc_cb()
768 data->tsc_timestamp = timestamp; in intel_pt_calc_cyc_cb()
769 data->timestamp = timestamp; in intel_pt_calc_cyc_cb()
835 cyc_to_tsc = (double)(timestamp - decoder->timestamp) / data->cycle_cnt; in intel_pt_calc_cyc_cb()
868 .timestamp = decoder->timestamp, in intel_pt_calc_cyc_to_tsc()
925 uint64_t timestamp, masked_timestamp; in intel_pt_next_period() local
927 timestamp = decoder->timestamp + decoder->timestamp_insn_cnt; in intel_pt_next_period()
928 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_next_period()
933 timestamp += 1; in intel_pt_next_period()
934 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_next_period()
944 return decoder->period_ticks - (timestamp - masked_timestamp); in intel_pt_next_period()
963 uint64_t timestamp, masked_timestamp; in intel_pt_sample_insn() local
970 timestamp = decoder->timestamp + decoder->timestamp_insn_cnt; in intel_pt_sample_insn()
971 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_sample_insn()
1403 static uint64_t intel_pt_8b_tsc(uint64_t timestamp, uint64_t ref_timestamp) in intel_pt_8b_tsc() argument
1405 timestamp |= (ref_timestamp & (0xffULL << 56)); in intel_pt_8b_tsc()
1407 if (timestamp < ref_timestamp) { in intel_pt_8b_tsc()
1408 if (ref_timestamp - timestamp > (1ULL << 55)) in intel_pt_8b_tsc()
1409 timestamp += (1ULL << 56); in intel_pt_8b_tsc()
1411 if (timestamp - ref_timestamp > (1ULL << 55)) in intel_pt_8b_tsc()
1412 timestamp -= (1ULL << 56); in intel_pt_8b_tsc()
1415 return timestamp; in intel_pt_8b_tsc()
1420 uint64_t timestamp; in intel_pt_calc_tsc_timestamp() local
1425 timestamp = intel_pt_8b_tsc(decoder->packet.payload, in intel_pt_calc_tsc_timestamp()
1427 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1428 decoder->timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1431 } else if (decoder->timestamp) { in intel_pt_calc_tsc_timestamp()
1432 timestamp = decoder->packet.payload | in intel_pt_calc_tsc_timestamp()
1433 (decoder->timestamp & (0xffULL << 56)); in intel_pt_calc_tsc_timestamp()
1434 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1435 if (timestamp < decoder->timestamp && in intel_pt_calc_tsc_timestamp()
1436 decoder->timestamp - timestamp < decoder->tsc_slip) { in intel_pt_calc_tsc_timestamp()
1438 timestamp); in intel_pt_calc_tsc_timestamp()
1439 timestamp = decoder->timestamp; in intel_pt_calc_tsc_timestamp()
1441 if (timestamp < decoder->timestamp) { in intel_pt_calc_tsc_timestamp()
1442 intel_pt_log_to("Wraparound timestamp", timestamp); in intel_pt_calc_tsc_timestamp()
1443 timestamp += (1ULL << 56); in intel_pt_calc_tsc_timestamp()
1444 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1446 decoder->timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1451 decoder->cyc_ref_timestamp = decoder->timestamp; in intel_pt_calc_tsc_timestamp()
1457 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_tsc_timestamp()
1475 decoder->cyc_cnt_timestamp = decoder->timestamp; in intel_pt_mtc_cyc_cnt_pge()
1496 if (!decoder->pge || decoder->timestamp <= decoder->cyc_cnt_timestamp) in intel_pt_mtc_cyc_cnt_upd()
1499 tsc_delta = decoder->timestamp - decoder->cyc_cnt_timestamp; in intel_pt_mtc_cyc_cnt_upd()
1538 uint64_t timestamp; in intel_pt_calc_mtc_timestamp() local
1560 timestamp = decoder->ctc_timestamp + in intel_pt_calc_mtc_timestamp()
1563 timestamp = decoder->ctc_timestamp + in intel_pt_calc_mtc_timestamp()
1569 if (timestamp < decoder->timestamp) in intel_pt_calc_mtc_timestamp()
1571 timestamp, decoder->timestamp); in intel_pt_calc_mtc_timestamp()
1573 decoder->timestamp = timestamp; in intel_pt_calc_mtc_timestamp()
1581 decoder->cyc_ref_timestamp = decoder->timestamp; in intel_pt_calc_mtc_timestamp()
1587 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_mtc_timestamp()
1607 uint64_t timestamp = decoder->cyc_ref_timestamp; in intel_pt_calc_cyc_timestamp() local
1620 timestamp += decoder->cycle_cnt * decoder->calc_cyc_to_tsc; in intel_pt_calc_cyc_timestamp()
1622 timestamp += decoder->cycle_cnt * decoder->cbr_cyc_to_tsc; in intel_pt_calc_cyc_timestamp()
1626 if (timestamp < decoder->timestamp) in intel_pt_calc_cyc_timestamp()
1628 timestamp, decoder->timestamp); in intel_pt_calc_cyc_timestamp()
1630 decoder->timestamp = timestamp; in intel_pt_calc_cyc_timestamp()
1634 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_cyc_timestamp()
2158 if (!decoder->timestamp) in intel_pt_walk_trace()
2819 decoder->state.timestamp = decoder->sample_timestamp; in intel_pt_decode()
3142 uint64_t timestamp; member
3180 if (tsc < d->timestamp) in intel_pt_ff_cb()
3197 int intel_pt_fast_forward(struct intel_pt_decoder *decoder, uint64_t timestamp) in intel_pt_fast_forward() argument
3199 struct fast_forward_data d = { .timestamp = timestamp }; in intel_pt_fast_forward()
3204 intel_pt_log("Fast forward towards timestamp " x64_fmt "\n", timestamp); in intel_pt_fast_forward()
3249 if (tsc < timestamp) { in intel_pt_fast_forward()