Lines Matching full:tsc

46 int pt_time_query_tsc(uint64_t *tsc, uint32_t *lost_mtc,  in pt_time_query_tsc()  argument
49 if (!tsc || !time) in pt_time_query_tsc()
52 *tsc = time->tsc; in pt_time_query_tsc()
91 * around twice, timing will be wrong until the next TSC. in pt_time_ctc_delta()
142 time->tsc = time->base = packet->tsc; in pt_time_update_tsc()
184 /* Without a TSC something is seriously wrong. */ in pt_time_update_tma()
188 /* We shouldn't have more than one TMA per TSC. */ in pt_time_update_tma()
192 /* We're ignoring MTC between TSC and TMA. */ in pt_time_update_tma()
222 * extended MTC period the TSC occurred. The estimation will place it in pt_time_update_tma()
239 uint64_t tsc, base; in pt_time_update_mtc() local
250 /* We ignore MTCs between TSC and TMA to avoid apparent CTC overflows. in pt_time_update_mtc()
254 * the TSC into the wrong MTC period. in pt_time_update_mtc()
310 * there are, we might place the TSC into the wrong MTC period in pt_time_update_mtc()
331 errcode = pt_time_ctc_fc(&tsc, ctc_delta, config); in pt_time_update_mtc()
335 base += tsc; in pt_time_update_mtc()
336 time->tsc = time->base = base; in pt_time_update_mtc()
354 * We only consider MTC. For the first CYC after TSC, the corresponding TMA
355 * will contain the Fast Counter at TSC.
435 time->tsc = time->base + fc; in pt_time_update_cyc()
508 /* A TSC outside of PSB+ may indicate loss of time. We do not use it in pt_tcal_update_tsc()
509 * for calibration. We store the TSC value for calibration at the next in pt_tcal_update_tsc()
510 * TSC in PSB+, though. in pt_tcal_update_tsc()
512 tcal->tsc = packet->tsc; in pt_tcal_update_tsc()
522 uint64_t tsc, last_tsc, tsc_delta, cyc, fcr; in pt_tcal_header_tsc() local
529 last_tsc = tcal->tsc; in pt_tcal_header_tsc()
532 tsc = packet->tsc; in pt_tcal_header_tsc()
534 tcal->tsc = tsc; in pt_tcal_header_tsc()
540 /* Prefer MTC over TSC for calibration. */ in pt_tcal_header_tsc()
545 if (tsc < last_tsc) { in pt_tcal_header_tsc()
546 tsc += 1ull << pt_pl_tsc_bit_size; in pt_tcal_header_tsc()
548 if (tsc < last_tsc) in pt_tcal_header_tsc()
552 tsc_delta = tsc - last_tsc; in pt_tcal_header_tsc()
556 * Since we're only collecting the CYCs between two TSC, we shouldn't in pt_tcal_header_tsc()
753 tcal->tsc = 0ull; in pt_tcal_update_ovf()