ScarletNX / ScarletNX documentation / Profiling · ← previous
Pitfalls
- Profiling changes the run. Tracy's sampler,
--log=2, the GPU track's draw zones, tracy_frame_images and
DWARF call graphs all cost time. Find hot spots with them; measure speed without them.
- The pace hides the work. With
fps_limit and vsync on, a faster frame only waits longer. Profile uncapped,
or read frame work time rather than frame rate.
- Cold caches. Shader translation, pipeline creation and JIT compiles dominate a first run. Profile a warm one
unless the start is the subject.
[unknown] is not noise. It is usually JIT code (or NCE code): see The JIT.
- Stacks through the game's code are not trustworthy. Self time is; use LBR on Intel for callers.
- A per-draw timestamp serializes draws. Draw-level GPU timings rank draws inside a pass; they do not add up to
the frame.
- Clocks. CPU frequency scaling and GPU boost move between runs. Pin the governor (
cpupower frequency-set -g
performance on Linux, powerd off or sysctl dev.cpu.0.freq on FreeBSD) and warm up before measuring; compare
within one run where a tool allows it.
- Two viewers of Tracy. The client takes one connection: a capture and the GUI cannot both have a run.
- Data stays local. Traces, captures, corpora and symbolized profiles contain the game's code and assets.
← previous