Skip to content

Commit

Permalink
docs(tracy): Add build details to tracy guide
Browse files Browse the repository at this point in the history
  • Loading branch information
badosu committed Apr 30, 2024
1 parent 7ad41f2 commit e9f026b
Showing 1 changed file with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
layout: default
layout: post
title: Profiling with Tracy
parent: Guides
permalink: guides/profiling-with-tracy
permalink: development/profiling-with-tracy
author: beherith
---

# How to profile the engine using tracy

## Preparation steps:
## Using a prebuilt binary:

1. Download Tracy, unzip it anywhere: https://github.com/wolfpld/tracy/releases/tag/v0.9.1

Expand All @@ -25,3 +25,21 @@ author: beherith
![image](https://github.com/beyond-all-reason/spring/assets/109391/830e5c6e-b37f-48ab-9adc-cc297cefff46)

8. Analyze profile.

## Building with Tracy support

The following options are available:

- `TRACY_ENABLE`: Enable tracy profiling
- `TRACY_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:

```bash
./build.sh -o -t RELEASE -C -DTRACY_ENABLE=1 -p linux-64
```

0 comments on commit e9f026b

Please sign in to comment.