Lines Matching refs:timestamp
155 uint64_t timestamp; member
621 decoder->sample_timestamp = decoder->timestamp; in intel_pt_update_sample_time()
630 decoder->timestamp = 0; in intel_pt_reposition()
780 uint64_t timestamp; member
811 uint64_t timestamp; in intel_pt_calc_cyc_cb() local
858 timestamp = data->ctc_timestamp + in intel_pt_calc_cyc_cb()
861 timestamp = data->ctc_timestamp + in intel_pt_calc_cyc_cb()
867 if (timestamp < data->timestamp) in intel_pt_calc_cyc_cb()
871 data->timestamp = timestamp; in intel_pt_calc_cyc_cb()
884 timestamp = pkt_info->packet.payload | in intel_pt_calc_cyc_cb()
885 (data->timestamp & (0xffULL << 56)); in intel_pt_calc_cyc_cb()
886 if (data->from_mtc && timestamp < data->timestamp && in intel_pt_calc_cyc_cb()
887 data->timestamp - timestamp < decoder->tsc_slip) in intel_pt_calc_cyc_cb()
889 if (timestamp < data->timestamp) in intel_pt_calc_cyc_cb()
890 timestamp += (1ULL << 56); in intel_pt_calc_cyc_cb()
894 data->tsc_timestamp = timestamp; in intel_pt_calc_cyc_cb()
895 data->timestamp = timestamp; in intel_pt_calc_cyc_cb()
961 cyc_to_tsc = (double)(timestamp - decoder->timestamp) / data->cycle_cnt; in intel_pt_calc_cyc_cb()
994 .timestamp = decoder->timestamp, in intel_pt_calc_cyc_to_tsc()
1051 uint64_t timestamp, masked_timestamp; in intel_pt_next_period() local
1053 timestamp = decoder->timestamp + decoder->timestamp_insn_cnt; in intel_pt_next_period()
1054 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_next_period()
1059 timestamp += 1; in intel_pt_next_period()
1060 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_next_period()
1070 return decoder->period_ticks - (timestamp - masked_timestamp); in intel_pt_next_period()
1089 uint64_t timestamp, masked_timestamp; in intel_pt_sample_insn() local
1096 timestamp = decoder->timestamp + decoder->timestamp_insn_cnt; in intel_pt_sample_insn()
1097 masked_timestamp = timestamp & decoder->period_mask; in intel_pt_sample_insn()
1773 static uint64_t intel_pt_8b_tsc(uint64_t timestamp, uint64_t ref_timestamp) in intel_pt_8b_tsc() argument
1775 timestamp |= (ref_timestamp & (0xffULL << 56)); in intel_pt_8b_tsc()
1777 if (timestamp < ref_timestamp) { in intel_pt_8b_tsc()
1778 if (ref_timestamp - timestamp > (1ULL << 55)) in intel_pt_8b_tsc()
1779 timestamp += (1ULL << 56); in intel_pt_8b_tsc()
1781 if (timestamp - ref_timestamp > (1ULL << 55)) in intel_pt_8b_tsc()
1782 timestamp -= (1ULL << 56); in intel_pt_8b_tsc()
1785 return timestamp; in intel_pt_8b_tsc()
1790 uint64_t timestamp) in intel_pt_time_in_range() argument
1798 return timestamp >= decoder->last_reliable_timestamp && in intel_pt_time_in_range()
1799 timestamp < decoder->buf_timestamp; in intel_pt_time_in_range()
1804 uint64_t timestamp; in intel_pt_calc_tsc_timestamp() local
1810 timestamp = intel_pt_8b_tsc(decoder->packet.payload, in intel_pt_calc_tsc_timestamp()
1812 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1813 decoder->timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1816 } else if (decoder->timestamp) { in intel_pt_calc_tsc_timestamp()
1817 timestamp = decoder->packet.payload | in intel_pt_calc_tsc_timestamp()
1818 (decoder->timestamp & (0xffULL << 56)); in intel_pt_calc_tsc_timestamp()
1819 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1820 if (timestamp < decoder->timestamp && in intel_pt_calc_tsc_timestamp()
1821 decoder->timestamp - timestamp < decoder->tsc_slip) { in intel_pt_calc_tsc_timestamp()
1823 timestamp); in intel_pt_calc_tsc_timestamp()
1824 timestamp = decoder->timestamp; in intel_pt_calc_tsc_timestamp()
1826 if (timestamp < decoder->timestamp) { in intel_pt_calc_tsc_timestamp()
1828 (timestamp + (1ULL << 56) < decoder->buf_timestamp)) { in intel_pt_calc_tsc_timestamp()
1829 intel_pt_log_to("Wraparound timestamp", timestamp); in intel_pt_calc_tsc_timestamp()
1830 timestamp += (1ULL << 56); in intel_pt_calc_tsc_timestamp()
1831 decoder->tsc_timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1833 intel_pt_log_to("Suppressing bad timestamp", timestamp); in intel_pt_calc_tsc_timestamp()
1834 timestamp = decoder->timestamp; in intel_pt_calc_tsc_timestamp()
1839 (bad || !intel_pt_time_in_range(decoder, timestamp)) && in intel_pt_calc_tsc_timestamp()
1842 decoder->timestamp = timestamp; in intel_pt_calc_tsc_timestamp()
1847 decoder->cyc_ref_timestamp = decoder->timestamp; in intel_pt_calc_tsc_timestamp()
1853 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_tsc_timestamp()
1876 decoder->cyc_cnt_timestamp = decoder->timestamp; in intel_pt_mtc_cyc_cnt_pge()
1897 if (!decoder->pge || decoder->timestamp <= decoder->cyc_cnt_timestamp) in intel_pt_mtc_cyc_cnt_upd()
1900 tsc_delta = decoder->timestamp - decoder->cyc_cnt_timestamp; in intel_pt_mtc_cyc_cnt_upd()
1940 uint64_t timestamp; in intel_pt_calc_mtc_timestamp() local
1962 timestamp = decoder->ctc_timestamp + in intel_pt_calc_mtc_timestamp()
1965 timestamp = decoder->ctc_timestamp + in intel_pt_calc_mtc_timestamp()
1971 if (timestamp < decoder->timestamp) in intel_pt_calc_mtc_timestamp()
1973 timestamp, decoder->timestamp); in intel_pt_calc_mtc_timestamp()
1975 decoder->timestamp = timestamp; in intel_pt_calc_mtc_timestamp()
1983 decoder->cyc_ref_timestamp = decoder->timestamp; in intel_pt_calc_mtc_timestamp()
1989 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_mtc_timestamp()
2003 decoder->cyc_ref_timestamp = decoder->timestamp; in intel_pt_calc_cbr()
2011 uint64_t timestamp = decoder->cyc_ref_timestamp; in intel_pt_calc_cyc_timestamp() local
2024 timestamp += decoder->cycle_cnt * decoder->calc_cyc_to_tsc; in intel_pt_calc_cyc_timestamp()
2026 timestamp += decoder->cycle_cnt * decoder->cbr_cyc_to_tsc; in intel_pt_calc_cyc_timestamp()
2030 if (timestamp < decoder->timestamp) in intel_pt_calc_cyc_timestamp()
2032 timestamp, decoder->timestamp); in intel_pt_calc_cyc_timestamp()
2034 decoder->timestamp = timestamp; in intel_pt_calc_cyc_timestamp()
2038 intel_pt_log_to("Setting timestamp", decoder->timestamp); in intel_pt_calc_cyc_timestamp()
2635 ref_timestamp = decoder->timestamp ? decoder->timestamp : decoder->buf_timestamp; in intel_pt_vm_tm_corr_tsc()
2781 host_tsc = intel_pt_8b_tsc(host_tsc, decoder->timestamp); in intel_pt_vm_tm_corr_pebs_tsc()
2792 host_tsc = decoder->timestamp; in intel_pt_vm_tm_corr_pebs_tsc()
3343 if (!decoder->timestamp) in intel_pt_walk_trace()
3924 if (!decoder->timestamp) in intel_pt_sync()
3925 decoder->timestamp = 1; in intel_pt_sync()
4070 decoder->state.timestamp = decoder->sample_timestamp; in intel_pt_decode()
4396 uint64_t timestamp; member
4434 if (tsc < d->timestamp) in intel_pt_ff_cb()
4451 int intel_pt_fast_forward(struct intel_pt_decoder *decoder, uint64_t timestamp) in intel_pt_fast_forward() argument
4453 struct fast_forward_data d = { .timestamp = timestamp }; in intel_pt_fast_forward()
4458 intel_pt_log("Fast forward towards timestamp " x64_fmt "\n", timestamp); in intel_pt_fast_forward()
4503 if (tsc < timestamp) { in intel_pt_fast_forward()