• Home
  • Raw
  • Download

Lines Matching full:timestamp

129 	uint64_t timestamp;  member
292 * A TSC packet can slip past MTC packets so that the timestamp appears in intel_pt_decoder_new()
299 intel_pt_log("timestamp: mtc_shift %u\n", decoder->mtc_shift); in intel_pt_decoder_new()
300 intel_pt_log("timestamp: tsc_ctc_ratio_n %u\n", decoder->tsc_ctc_ratio_n); in intel_pt_decoder_new()
301 intel_pt_log("timestamp: tsc_ctc_ratio_d %u\n", decoder->tsc_ctc_ratio_d); in intel_pt_decoder_new()
302 intel_pt_log("timestamp: tsc_ctc_mult %u\n", decoder->tsc_ctc_mult); in intel_pt_decoder_new()
303 intel_pt_log("timestamp: tsc_slip %#x\n", decoder->tsc_slip); in intel_pt_decoder_new()
520 decoder->sample_timestamp = decoder->timestamp; in intel_pt_update_sample_time()
528 decoder->timestamp = 0; in intel_pt_reposition()
554 intel_pt_log("Reference timestamp 0x%" PRIx64 "\n", in intel_pt_get_data()
677 uint64_t timestamp; member
708 uint64_t timestamp; in intel_pt_calc_cyc_cb() local
752 timestamp = data->ctc_timestamp + in intel_pt_calc_cyc_cb()
755 timestamp = data->ctc_timestamp + in intel_pt_calc_cyc_cb()
761 if (timestamp < data->timestamp) in intel_pt_calc_cyc_cb()
765 data->timestamp = timestamp; in intel_pt_calc_cyc_cb()
778 timestamp = pkt_info->packet.payload | in intel_pt_calc_cyc_cb()
779 (data->timestamp & (0xffULL << 56)); in intel_pt_calc_cyc_cb()
780 if (data->from_mtc && timestamp < data->timestamp && in intel_pt_calc_cyc_cb()
781 data->timestamp - timestamp < decoder->tsc_slip) in intel_pt_calc_cyc_cb()
783 if (timestamp < data->timestamp) in intel_pt_calc_cyc_cb()
784 timestamp += (1ULL << 56); in intel_pt_calc_cyc_cb()
788 data->tsc_timestamp = timestamp; in intel_pt_calc_cyc_cb()
789 data->timestamp = timestamp; in intel_pt_calc_cyc_cb()
855 cyc_to_tsc = (double)(timestamp - decoder->timestamp) / data->cycle_cnt; in intel_pt_calc_cyc_cb()
859 …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()
868 …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()
871 …intel_pt_log("Timestamp: calculated %g TSC ticks per cycle c.f. unknown CBR-based value, pos " x64… in intel_pt_calc_cyc_cb()
888 .timestamp = decoder->timestamp, in intel_pt_calc_cyc_to_tsc()
945 uint64_t timestamp, masked_timestamp; in intel_pt_next_period() local
947 timestamp = decoder->timestamp + decoder->timestamp_insn_cnt; in intel_pt_next_period()
948 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_next_period()
953 timestamp += 1; in intel_pt_next_period()
954 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_next_period()
964 return decoder->period_ticks - (timestamp - masked_timestamp); in intel_pt_next_period()
983 uint64_t timestamp, masked_timestamp; in intel_pt_sample_insn() local
990 timestamp = decoder->timestamp + decoder->timestamp_insn_cnt; in intel_pt_sample_insn()
991 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_sample_insn()
1435 static uint64_t intel_pt_8b_tsc(uint64_t timestamp, uint64_t ref_timestamp) in intel_pt_8b_tsc() argument
1437 timestamp |= (ref_timestamp & (0xffULL << 56)); in intel_pt_8b_tsc()
1439 if (timestamp < ref_timestamp) { in intel_pt_8b_tsc()
1440 if (ref_timestamp - timestamp > (1ULL << 55)) in intel_pt_8b_tsc()
1441 timestamp += (1ULL << 56); in intel_pt_8b_tsc()
1443 if (timestamp - ref_timestamp > (1ULL << 55)) in intel_pt_8b_tsc()
1444 timestamp -= (1ULL << 56); in intel_pt_8b_tsc()
1447 return timestamp; in intel_pt_8b_tsc()
1452 uint64_t timestamp; in intel_pt_calc_tsc_timestamp() local
1457 timestamp = intel_pt_8b_tsc(decoder->packet.payload, in intel_pt_calc_tsc_timestamp()
1459 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1460 decoder->timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1463 } else if (decoder->timestamp) { in intel_pt_calc_tsc_timestamp()
1464 timestamp = decoder->packet.payload | in intel_pt_calc_tsc_timestamp()
1465 (decoder->timestamp & (0xffULL << 56)); in intel_pt_calc_tsc_timestamp()
1466 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1467 if (timestamp < decoder->timestamp && in intel_pt_calc_tsc_timestamp()
1468 decoder->timestamp - timestamp < decoder->tsc_slip) { in intel_pt_calc_tsc_timestamp()
1469 intel_pt_log_to("Suppressing backwards timestamp", in intel_pt_calc_tsc_timestamp()
1470 timestamp); in intel_pt_calc_tsc_timestamp()
1471 timestamp = decoder->timestamp; in intel_pt_calc_tsc_timestamp()
1473 if (timestamp < decoder->timestamp) { in intel_pt_calc_tsc_timestamp()
1474 intel_pt_log_to("Wraparound timestamp", timestamp); in intel_pt_calc_tsc_timestamp()
1475 timestamp += (1ULL << 56); in intel_pt_calc_tsc_timestamp()
1476 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1478 decoder->timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1483 decoder->cyc_ref_timestamp = decoder->timestamp; in intel_pt_calc_tsc_timestamp()
1489 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_tsc_timestamp()
1516 decoder->cyc_cnt_timestamp = decoder->timestamp; in intel_pt_mtc_cyc_cnt_pge()
1537 if (!decoder->pge || decoder->timestamp <= decoder->cyc_cnt_timestamp) in intel_pt_mtc_cyc_cnt_upd()
1540 tsc_delta = decoder->timestamp - decoder->cyc_cnt_timestamp; in intel_pt_mtc_cyc_cnt_upd()
1573 intel_pt_log("CTC timestamp " x64_fmt " last MTC %#x CTC rem %#x\n", in intel_pt_calc_tma()
1579 uint64_t timestamp; in intel_pt_calc_mtc_timestamp() local
1601 timestamp = decoder->ctc_timestamp + in intel_pt_calc_mtc_timestamp()
1604 timestamp = decoder->ctc_timestamp + in intel_pt_calc_mtc_timestamp()
1610 if (timestamp < decoder->timestamp) in intel_pt_calc_mtc_timestamp()
1611 intel_pt_log("Suppressing MTC timestamp " x64_fmt " less than current timestamp " x64_fmt "\n", in intel_pt_calc_mtc_timestamp()
1612 timestamp, decoder->timestamp); in intel_pt_calc_mtc_timestamp()
1614 decoder->timestamp = timestamp; in intel_pt_calc_mtc_timestamp()
1622 decoder->cyc_ref_timestamp = decoder->timestamp; in intel_pt_calc_mtc_timestamp()
1628 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_mtc_timestamp()
1648 uint64_t timestamp = decoder->cyc_ref_timestamp; in intel_pt_calc_cyc_timestamp() local
1661 timestamp += decoder->cycle_cnt * decoder->calc_cyc_to_tsc; in intel_pt_calc_cyc_timestamp()
1663 timestamp += decoder->cycle_cnt * decoder->cbr_cyc_to_tsc; in intel_pt_calc_cyc_timestamp()
1667 if (timestamp < decoder->timestamp) in intel_pt_calc_cyc_timestamp()
1668 intel_pt_log("Suppressing CYC timestamp " x64_fmt " less than current timestamp " x64_fmt "\n", in intel_pt_calc_cyc_timestamp()
1669 timestamp, decoder->timestamp); in intel_pt_calc_cyc_timestamp()
1671 decoder->timestamp = timestamp; in intel_pt_calc_cyc_timestamp()
1675 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_cyc_timestamp()
2216 /* Ensure that there is a timestamp */ in intel_pt_walk_trace()
2217 if (!decoder->timestamp) in intel_pt_walk_trace()
2887 decoder->state.timestamp = decoder->sample_timestamp; in intel_pt_decode()
3205 * @timestamp: timestamp to fast forward towards
3206 * @buf_timestamp: buffer timestamp of last buffer with trace data earlier than
3207 * the fast forward timestamp.
3210 uint64_t timestamp; member
3219 * Determine if @buffer trace is past the fast forward timestamp.
3222 * timestamp, and 0 otherwise.
3241 intel_pt_log("Buffer 1st timestamp " x64_fmt " ref timestamp " x64_fmt "\n", in intel_pt_ff_cb()
3245 * If the buffer contains a timestamp earlier that the fast forward in intel_pt_ff_cb()
3246 * timestamp, then record it, else stop. in intel_pt_ff_cb()
3248 if (tsc < d->timestamp) in intel_pt_ff_cb()
3259 * @timestamp: timestamp to fast forward towards
3261 * Reposition decoder at the last PSB with a timestamp earlier than @timestamp.
3265 int intel_pt_fast_forward(struct intel_pt_decoder *decoder, uint64_t timestamp) in intel_pt_fast_forward() argument
3267 struct fast_forward_data d = { .timestamp = timestamp }; in intel_pt_fast_forward()
3272 intel_pt_log("Fast forward towards timestamp " x64_fmt "\n", timestamp); in intel_pt_fast_forward()
3274 /* Find buffer timestamp of buffer to fast forward to */ in intel_pt_fast_forward()
3279 /* Walk to buffer with same buffer timestamp */ in intel_pt_fast_forward()
3301 * Walk PSBs while the PSB timestamp is less than the fast forward in intel_pt_fast_forward()
3302 * timestamp. in intel_pt_fast_forward()
3313 * forward, decoding starts at the TSC timestamp. That means in intel_pt_fast_forward()
3317 if (tsc < timestamp) { in intel_pt_fast_forward()
3318 intel_pt_log("Fast forward to next PSB timestamp " x64_fmt "\n", tsc); in intel_pt_fast_forward()