/freebsd/contrib/llvm-project/compiler-rt/lib/xray/ |
H A D | xray_fdr_controller.h | 146 PreambleResult recordPreamble(uint64_t TSC, in recordPreamble() argument 149 // We update our internal tracking state for the Latest TSC and CPU we've in recordPreamble() 151 LatestTSC = TSC; in recordPreamble() 157 W.writeMetadata<MetadataRecord::RecordKinds::NewCPUId>(CPU, TSC); in recordPreamble() 163 if (UNLIKELY(LatestTSC > TSC || in recordPreamble() 164 TSC - LatestTSC > in recordPreamble() 166 // Either the TSC has wrapped around from the last TSC we've seen or the in recordPreamble() 169 LatestTSC = TSC; in recordPreamble() 174 W.writeMetadata<MetadataRecord::RecordKinds::TSCWrap>(TSC); in recordPreamble() 181 bool rewindRecords(int32_t FuncId, uint64_t TSC, in rewindRecords() argument [all …]
|
H A D | xray_fdr_logging.cpp | 153 // metadata records for TSC wraparound and CPU migration). in fdrCommonHeaderInfo() 408 uint64_t TSC = 0; member 413 // We want to get the TSC as early as possible, so that we can check whether in getTimestamp() 425 Result.TSC = __xray::readTSC(Result.CPU); in getTimestamp() 435 Result.TSC = TS.tv_sec * __xray::NanosecondsPerSecond + TS.tv_nsec; in getTimestamp() 494 auto &TSC = TC.TSC; in fdrLoggingHandleArg0() local 507 TLD.Controller->functionEnter(FuncId, TSC, CPU); in fdrLoggingHandleArg0() 510 TLD.Controller->functionExit(FuncId, TSC, CPU); in fdrLoggingHandleArg0() 513 TLD.Controller->functionTailExit(FuncId, TSC, CPU); in fdrLoggingHandleArg0() 524 auto &TSC = TC.TSC; in fdrLoggingHandleArg1() local [all …]
|
/freebsd/sys/dev/hwpmc/ |
H A D | hwpmc_tsc.c | 37 * TSC support. 51 .pd_name = "TSC", 75 ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); in tsc_allocate_pmc() 77 ("[tsc,%d] illegal row index %d", __LINE__, ri)); in tsc_allocate_pmc() 97 ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); in tsc_config_pmc() 98 KASSERT(ri == 0, ("[tsc,%d] illegal row-index %d", __LINE__, ri)); in tsc_config_pmc() 103 ("[tsc,%d] pm=%p phw->pm=%p hwpmc not unconfigured", __LINE__, in tsc_config_pmc() 118 ("[tsc,%d] illegal CPU %d", __LINE__, cpu)); in tsc_describe() 119 KASSERT(ri == 0, ("[tsc,%d] illegal row-index %d", __LINE__, ri)); in tsc_describe() 143 ("[tsc,%d] illegal CPU %d", __LINE__, cpu)); in tsc_get_config() [all …]
|
/freebsd/sys/x86/x86/ |
H A D | tsc.c | 66 &tsc_is_invariant, 0, "Indicates whether the TSC is P-state invariant"); 71 "Indicates whether the TSC is safe to use in SMP mode"); 75 &smp_tsc_adjust, 0, "Try to adjust TSC on APs to match BSP"); 80 &tsc_shift, 0, "Shift to pre-apply for the maximum TSC frequency"); 89 "Disable early TSC frequency calibration"); 114 .tc_name = "TSC", 164 * Calculate TSC frequency using information from the CPUID leaf 0x15 'Time 279 * Try to determine the TSC frequency using CPUID or hypercalls. If successful, 280 * this lets use the TSC for early DELAY() calls instead of the 8254 timer, 289 /* The TSC is known to be broken on certain CPUs. */ in probe_tsc_freq_early() [all …]
|
/freebsd/contrib/processor-trace/libipt/src/ |
H A D | pt_time.c | 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 [all …]
|
/freebsd/contrib/llvm-project/lldb/source/Plugins/Trace/intel-pt/ |
H A D | DecodedThread.cpp | 61 // If this is the last TSC range, so we have to extrapolate. In this case, in GetInterpolatedTime() 62 // we assume that each instruction took one TSC, which is what an in GetInterpolatedTime() 65 return interpolate(tsc_conversion.ToNanos(tsc + items_count)); in GetInterpolatedTime() 67 if (items_count < (next_range->tsc - tsc)) { in GetInterpolatedTime() 68 // If the numbers of items in this range is less than the total TSC duration in GetInterpolatedTime() 69 // of this range, i.e. each instruction taking longer than 1 TSC, then we in GetInterpolatedTime() 72 // also assume that each instruction took 1 TSC. A proper way to improve in GetInterpolatedTime() 79 std::min(tsc_conversion.ToNanos(tsc + items_count), next_range->nanos)); in GetInterpolatedTime() 82 // In this case, each item took less than 1 TSC, s in GetInterpolatedTime() 118 NotifyTsc(TSC tsc) NotifyTsc() argument [all...] |
H A D | PerfContextSwitchDecoder.cpp | 86 /// PerfContextSwitchRecord is that this one uses tsc instead of nanos. 88 uint64_t tsc; member 201 cpu_id, current_record.tid, current_record.pid, current_record.tsc)); in RecoverExecutionsFromConsecutiveRecords() 208 if (prev.tsc >= current_record.tsc) in RecoverExecutionsFromConsecutiveRecords() 212 "record. Previous TSC= {0}, current TSC = {1}.", in RecoverExecutionsFromConsecutiveRecords() 213 prev.tsc, current_record.tsc)); in RecoverExecutionsFromConsecutiveRecords() 219 cpu_id, prev.tid, prev.pid, prev.tsc, current_record.tsc - 1)); in RecoverExecutionsFromConsecutiveRecords() 224 cpu_id, current_record.tid, current_record.pid, prev.tsc + 1, in RecoverExecutionsFromConsecutiveRecords() 225 current_record.tsc)); in RecoverExecutionsFromConsecutiveRecords() 230 cpu_id, current_record.tid, current_record.pid, prev.tsc, in RecoverExecutionsFromConsecutiveRecords() [all …]
|
H A D | LibiptDecoder.cpp | 337 /// Any of this PSB's data occurring after this TSC will be excluded. 341 std::optional<DecodedThread::TSC> tsc_upper_bound) in PSBBlockDecoder() 375 std::optional<DecodedThread::TSC> tsc_upper_bound) { in Create() 391 // We emit a TSC before a sync event to more easily associate a timestamp to in DecodePSBBlock() 392 // the sync event. If present, the current block's TSC would be the first in DecodePSBBlock() 393 // TSC we'll see when processing events. in DecodePSBBlock() 394 if (m_psb_block.tsc) in DecodePSBBlock() 395 m_decoded_thread.NotifyTsc(*m_psb_block.tsc); in DecodePSBBlock() 464 /// Process the TSC of a decoded PT event. Specifically, check if this TSC 471 ProcessPTEventTSC(DecodedThread::TSC tsc) ProcessPTEventTSC() argument 716 std::optional<uint64_t> tsc; SplitTraceIntoPSBBlock() local [all...] |
H A D | DecodedThread.h | 64 using TSC = uint64_t; 67 /// the same TSC value. 69 TSC tsc; 86 /// The corresponding TSC value for this range. member 87 TSC tsc; 107 /// The tsc -> nanos conversion utility 187 /// that have the same TSC value. 193 /// The requested TSC rang 68 TSC tsc; global() member [all...] |
H A D | TraceIntelPTOptions.td | 20 : Option<"tsc", "t">, 22 Desc<"Enable the use of TSC timestamps. This is supported on all " 32 "TSC timestamp and the current absolute instruction pointer. " 74 "option forces the capture of TSC timestamps (see --tsc). Also, " 98 : Option<"tsc", "t">, 100 Desc<"Enable the use of TSC timestamps. This is supported on all " 110 "TSC timestamp and the current absolute instruction pointer. "
|
H A D | TraceIntelPTMultiCpuDecoder.cpp | 45 Expected<std::optional<uint64_t>> tsc = in FindLowestTSC() local 47 if (!tsc) in FindLowestTSC() 48 return tsc.takeError(); in FindLowestTSC() 49 if (*tsc && (!lowest_tsc || *lowest_tsc > **tsc)) in FindLowestTSC() 50 lowest_tsc = **tsc; in FindLowestTSC() 123 "TSC to nanoseconds conversion values were not found"); in DoCorrelateContextSwitchesAndIntelPtTraces() 142 *it->tsc < thread_execution.GetEndTSC(); in DoCorrelateContextSwitchesAndIntelPtTraces() 144 if (*it->tsc > thread_execution.GetStartTSC()) { in DoCorrelateContextSwitchesAndIntelPtTraces()
|
/freebsd/contrib/llvm-project/clang/lib/CodeGen/Targets/ |
H A D | XCore.cpp | 121 mutable TypeStringCache TSC; member in __anonc019d7680111::XCoreTargetCodeGenInfo 294 TypeStringCache &TSC); 301 if (getTypeString(Enc, D, CGM, TSC)) { in emitTargetMD() 329 TypeStringCache &TSC); 337 TypeStringCache &TSC) { in extractFieldType() argument 349 if (!appendType(Enc, Field->getType(), CGM, TSC)) in extractFieldType() 364 TypeStringCache &TSC, const IdentifierInfo *ID) { in appendRecordType() argument 366 StringRef TypeString = TSC.lookupStr(ID); in appendRecordType() 390 TSC.addIncomplete(ID, std::move(StubEnc)); in appendRecordType() 391 if (!extractFieldType(FE, RD, CGM, TSC)) { in appendRecordType() [all …]
|
/freebsd/contrib/processor-trace/libipt/internal/include/ |
H A D | pt_time.h | 45 uint64_t tsc; member 47 /* The base Time Stamp Count (from TSC and MTC). */ 68 /* A flag saying whether we have seen a TSC packet. */ 86 * Provides the estimated Time Stamp Count value in @tsc. 92 * Returns -pte_internal if @tsc or @time is NULL. 93 * Returns -pte_no_time if there has not been a TSC packet. 95 extern int pt_time_query_tsc(uint64_t *tsc, uint32_t *lost_mtc, 131 * use TSC, instead. 140 /* The last TSC value. 142 * Used for calibrating at TSC. [all …]
|
/freebsd/lib/libpmc/ |
H A D | pmc.tsc.3 | 28 .Nm pmc.tsc 39 .Dq Li tsc 42 The TSC is a read-only counter that may only be allocated in 45 .Dq Li tsc 48 Multiple processes are allowed to allocate the TSC. 49 Once allocated, the TSC may be read using the 57 maps to the TSC.
|
/freebsd/contrib/processor-trace/libipt/test/src/ |
H A D | ptunit-time.c | 151 uint64_t tsc; in query_tsc_null() local 157 errcode = pt_time_query_tsc(&tsc, NULL, NULL, NULL); in query_tsc_null() 165 uint64_t tsc; in query_tsc_none() local 168 errcode = pt_time_query_tsc(&tsc, NULL, NULL, &tfix->time); in query_tsc_none() 257 static struct ptunit_result tsc(struct time_fixture *tfix) in tsc() function 260 uint64_t tsc; in tsc() local 264 packet.tsc = 0xdedededeull; in tsc() 269 errcode = pt_time_query_tsc(&tsc, &lost_mtc, &lost_cyc, &tfix->time); in tsc() 272 ptu_uint_eq(tsc, 0xdedededeull); in tsc() 328 uint64_t tsc; in mtc() local [all …]
|
H A D | ptunit-query.c | 938 uint64_t tsc) in event_enabled() argument 962 if (!tsc) in event_enabled() 966 ptu_uint_eq(event.tsc, tsc); in event_enabled() 994 uint64_t tsc) in event_disabled() argument 1020 if (!tsc) in event_disabled() 1024 ptu_uint_eq(event.tsc, tsc); in event_disabled() 1051 enum pt_ip_compression ipc, uint64_t tsc) in event_async_disabled() argument 1083 if (!tsc) in event_async_disabled() 1087 ptu_uint_eq(event.tsc, tsc); in event_async_disabled() 1172 uint64_t tsc) in event_async_branch() argument [all …]
|
/freebsd/stand/libsa/ |
H A D | tslog.c | 43 tsccat(char * buf, uint64_t tsc) in tsccat() argument 48 if (tsc >= 10) in tsccat() 49 len = tsccat(buf, tsc / 10); in tsccat() 54 buf[len] = "0123456789"[tsc % 10]; in tsccat() 81 uint64_t tsc = rdtsc(); in tslog() local 83 uint64_t tsc = READ_SPECIALREG(cntvct_el0); in tslog() 85 uint64_t tsc = 0; in tslog() 100 tslog_bufpos += tsccat(&tslog_buf[tslog_bufpos], tsc); in tslog()
|
/freebsd/sys/contrib/xen/arch-x86/ |
H A D | cpuid.h | 78 * Sub-leaf 0: EAX: bit 0: emulated tsc 79 * bit 1: host tsc is known to be reliable 83 * ECX: guest tsc frequency in kHz 84 * EDX: guest tsc incarnation (migration count) 85 * Sub-leaf 1: EAX: tsc offset low part 86 * EBX: tsc offset high part 87 * ECX: multiplicator for tsc->ns conversion 88 * EDX: shift amount for tsc->ns conversion 89 * Sub-leaf 2: EAX: host tsc frequency in kHz
|
/freebsd/sys/contrib/device-tree/Bindings/input/touchscreen/ |
H A D | imx6ul_tsc.txt | 4 - compatible: must be "fsl,imx6ul-tsc". 8 - clock-names; must be "tsc" and "adc". 24 tsc: tsc@2040000 { 25 compatible = "fsl,imx6ul-tsc"; 31 clock-names = "tsc", "adc";
|
H A D | lpc32xx-tsc.txt | 1 * NXP LPC32xx SoC Touchscreen Controller (TSC) 4 - compatible: must be "nxp,lpc3220-tsc" 7 - interrupts: The TSC/ADC interrupt 11 tsc@40048000 { 12 compatible = "nxp,lpc3220-tsc";
|
H A D | fsl,imx6ul-tsc.yaml | 4 $id: http://devicetree.org/schemas/input/touchscreen/fsl,imx6ul-tsc.yaml# 16 const: fsl,imx6ul-tsc 33 - const: tsc 84 compatible = "fsl,imx6ul-tsc"; 90 clock-names = "tsc", "adc";
|
/freebsd/contrib/llvm-project/llvm/lib/XRay/ |
H A D | FDRTraceExpander.cpp | 30 BaseTSC = R.tsc(); in visit() 35 BaseTSC = R.tsc(); in visit() 42 CurrentRecord.TSC = R.tsc(); in visit() 57 CurrentRecord.TSC = BaseTSC; in visit() 72 CurrentRecord.TSC = BaseTSC; in visit() 116 CurrentRecord.TSC = BaseTSC; in visit()
|
/freebsd/contrib/llvm-project/lldb/include/lldb/Utility/ |
H A D | TraceIntelPTGDBRemotePackets.h | 38 /// Whether to enable TSC 85 /// TSC to wall time conversion values defined in the Linux perf_event_open API 91 /// Convert TSC value to nanosecond wall time. The beginning of time (0 98 /// \param[in] tsc 99 /// The TSC value to be converted. 103 uint64_t ToNanos(uint64_t tsc) const; 113 /// The TSC to wall time conversion if it exists, otherwise \b nullptr.
|
/freebsd/sys/cddl/dev/dtrace/i386/ |
H A D | dtrace_subr.c | 295 * Get TSC frequency known at this moment. in dtrace_gethrtime_init() 296 * This should be constant if TSC is invariant. in dtrace_gethrtime_init() 298 * will preserve monotonic property of TSC. in dtrace_gethrtime_init() 306 * Thus minimum supported TSC frequency is 62.5MHz. in dtrace_gethrtime_init() 309 ("TSC frequency is too low")); in dtrace_gethrtime_init() 316 * - it supports TSC frequencies as low as 62.5MHz (see above); in dtrace_gethrtime_init() 357 uint64_t tsc; in dtrace_gethrtime() local 362 * We split TSC value into lower and higher 32-bit halves and separately in dtrace_gethrtime() 368 tsc = rdtsc() - tsc_skew[curcpu]; in dtrace_gethrtime() 371 lo = tsc; in dtrace_gethrtime() [all …]
|
/freebsd/sys/kern/ |
H A D | kern_tslog.c | 50 uint64_t tsc; member 56 uint64_t tsc = get_cyclecount(); in tslog() local 72 timestamps[pos].tsc = tsc; in tslog() 109 (unsigned long long)timestamps[i].tsc); in sysctl_debug_tslog() 152 uint64_t tsc = get_cyclecount(); in tslog_user() local 168 procs[pid].tsc_forked = tsc; in tslog_user() 188 procs[pid].tsc_exited = tsc; in tslog_user()
|