How to profile the engine using tracy
Using a prebuilt binary:
Download Tracy, unzip it anywhere: https://github.com/wolfpld/tracy/releases/tag/v0.9.1
Get the exact engine version we are currently using from https://engine-builds.beyondallreason.dev/index.html
Find the exact engine version folder you are currently using (for example, for BAR that would be
BAR/data/engine
)A. Rename the old
spring.exe
tospring_vanilla.exe
, and extractspring.exe
from the archive to this engine folder.A. Start the game as you would otherwise via the launcher.
Launch
Tracy.exe
, and hit connect. If it throws an instrumentation error, connect again.
- Analyze profile.
Building with Tracy support
The following options are available:
TRACY_ENABLE
: Enable tracy profilingTRACY_ON_DEMAND
: On demand profiling is slightly more expensive, but it allows to run the build with tracing like regular build and attach late in game, where regular trace would just run out of memory because of size.TRACY_PROFILE_MEMORY
: Profile memory allocations. It’s pretty expensive and some places that use raw malloc have to be used with care.RECOIL_DETAILED_TRACY_ZONING
: Enable additional detailed tracy zones (only enable this for testing/debugging)
For example, building with docker and tracy support enabled:
./build.sh -o -t RELEASE -C -DTRACY_ENABLE=1 -p linux-64
Written by: beherith