Linux exposes time_zero/time_mult/time_shift on the perf_event mmap page for converting sample timestamps back to TSC cycles, gated by cap_user_time_zero. That flag only states the conversion math is valid; on Ryzen the kernel can leave it set while TSC silently drifts between cores, before the clocksource watchdog catches it. We've had user reports of this surfacing as garbage timestamps in traces. CheckLinuxPerfTscConsistency() first looks at the current clocksource in sysfs, then opens a dummy PERF_COUNT_SW_DUMMY event and verifies that a PR_SET_NAME-triggered PERF_RECORD_COMM timestamp inverts back into the rdtsc-sandwiched window with ~1 ms of slack. Modeled on tools/perf/tests/perf-time-to-tsc.c. Wired into CheckHardwareSupportsInvariantTSC() so a failing probe calls InitFailure in non-fallback builds and routes GetTime() to clock_gettime in TRACY_TIMER_FALLBACK builds. Inconclusive cases (perf blocked, no COMM record, etc) return true to avoid penalising sandboxed environments. Gated on TRACY_HAS_SYSTEM_TRACING so we only probe when Tracy would actually open perf events. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Tracy Profiler
A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications.
Tracy supports profiling CPU (Direct support is provided for C, C++, Lua, Python and Fortran integration. At the same time, third-party bindings to many other languages exist on the internet, such as Rust, Zig, C#, OCaml, Odin, etc.), GPU (All major graphic APIs: OpenGL, Vulkan, Direct3D 11/12, Metal, OpenCL, CUDA.), memory allocations, locks, context switches, automatically attribute screenshots to captured frames, and much more.
- Documentation for usage and build process instructions
- Releases containing the documentation (
tracy.pdf) and compiled Windows x64 binaries (Tracy-<version>.7z) as assets - Changelog
- Interactive demo
An Introduction to Tracy Profiler in C++ - Marcos Slomp - CppCon 2023
Introduction to Tracy Profiler v0.2
New features in Tracy Profiler v0.3
New features in Tracy Profiler v0.4
New features in Tracy Profiler v0.5
New features in Tracy Profiler v0.6
New features in Tracy Profiler v0.7
New features in Tracy Profiler v0.8



