CUDACtx's constructor writes GpuNewContext directly through QueueSerialFinish(), unlike every other GPU backend (Vulkan, OpenGL, D3D11/12, Metal, WebGPU, Rocprof), which all defer it via GetProfiler().DeferItem() so it survives on-demand's per-connection queue clear. A profiler connecting any time after the CUDA context is created (in practice: any time after process start) never receives GpuNewContext. The GpuContextName message that Name() sends right after (already correctly deferred) then crashes the server's Worker::ProcessGpuContextName with an unregistered context id (assert(ctx) fails; undefined behavior in release builds). Same fix already applied to the Rocprof backend in #1336. Fixes #1171. Includes a repro test under tests/cuda/repro/on_demand/, mirroring the structure #1336 added for Rocprof: a minimal CUDA program that creates an on-demand context (repro.cu/CMakeLists.txt), and a check_gpu_zones tool that loads the resulting .tracy file and verifies the GPU context was named and populated with zones. Verified locally: unpatched tracy-capture crashes on the first connection attempt; patched, three consecutive connect/disconnect cycles all succeed and check_gpu_zones reports a named context with recorded zones.
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 graphics/compute APIs: OpenGL, Vulkan, Direct3D 11/12, Metal, OpenCL, CUDA, WebGPU.), 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



