Lines Matching full:timestamp

122 	uint64_t timestamp;  member
272 * A TSC packet can slip past MTC packets so that the timestamp appears in intel_pt_decoder_new()
279 intel_pt_log("timestamp: mtc_shift %u\n", decoder->mtc_shift); in intel_pt_decoder_new()
280 intel_pt_log("timestamp: tsc_ctc_ratio_n %u\n", decoder->tsc_ctc_ratio_n); in intel_pt_decoder_new()
281 intel_pt_log("timestamp: tsc_ctc_ratio_d %u\n", decoder->tsc_ctc_ratio_d); in intel_pt_decoder_new()
282 intel_pt_log("timestamp: tsc_ctc_mult %u\n", decoder->tsc_ctc_mult); in intel_pt_decoder_new()
283 intel_pt_log("timestamp: tsc_slip %#x\n", decoder->tsc_slip); in intel_pt_decoder_new()
500 decoder->sample_timestamp = decoder->timestamp; in intel_pt_update_sample_time()
508 decoder->timestamp = 0; in intel_pt_reposition()
534 intel_pt_log("Reference timestamp 0x%" PRIx64 "\n", in intel_pt_get_data()
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()
839 …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()
848 …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()
851 …intel_pt_log("Timestamp: calculated %g TSC ticks per cycle c.f. unknown CBR-based value, pos " x64… 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()
1437 intel_pt_log_to("Suppressing backwards timestamp", 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()
1532 intel_pt_log("CTC timestamp " x64_fmt " last MTC %#x CTC rem %#x\n", in intel_pt_calc_tma()
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()
1570 intel_pt_log("Suppressing MTC timestamp " x64_fmt " less than current timestamp " x64_fmt "\n", 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()
1627 intel_pt_log("Suppressing CYC timestamp " x64_fmt " less than current timestamp " x64_fmt "\n", 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()
2157 /* Ensure that there is a timestamp */ in intel_pt_walk_trace()
2158 if (!decoder->timestamp) in intel_pt_walk_trace()
2819 decoder->state.timestamp = decoder->sample_timestamp; in intel_pt_decode()
3137 * @timestamp: timestamp to fast forward towards
3138 * @buf_timestamp: buffer timestamp of last buffer with trace data earlier than
3139 * the fast forward timestamp.
3142 uint64_t timestamp; member
3151 * Determine if @buffer trace is past the fast forward timestamp.
3154 * timestamp, and 0 otherwise.
3173 intel_pt_log("Buffer 1st timestamp " x64_fmt " ref timestamp " x64_fmt "\n", in intel_pt_ff_cb()
3177 * If the buffer contains a timestamp earlier that the fast forward in intel_pt_ff_cb()
3178 * timestamp, then record it, else stop. in intel_pt_ff_cb()
3180 if (tsc < d->timestamp) in intel_pt_ff_cb()
3191 * @timestamp: timestamp to fast forward towards
3193 * Reposition decoder at the last PSB with a timestamp earlier than @timestamp.
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()
3206 /* Find buffer timestamp of buffer to fast forward to */ in intel_pt_fast_forward()
3211 /* Walk to buffer with same buffer timestamp */ in intel_pt_fast_forward()
3233 * Walk PSBs while the PSB timestamp is less than the fast forward in intel_pt_fast_forward()
3234 * timestamp. in intel_pt_fast_forward()
3245 * forward, decoding starts at the TSC timestamp. That means in intel_pt_fast_forward()
3249 if (tsc < timestamp) { in intel_pt_fast_forward()
3250 intel_pt_log("Fast forward to next PSB timestamp " x64_fmt "\n", tsc); in intel_pt_fast_forward()