aboutsummaryrefslogtreecommitdiff
path: root/wiki
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-07-27 09:51:44 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-07-27 09:51:44 +0300
commitd5a8074b5388518871a949093e34f44d735157e7 (patch)
tree190ca2430cac310190d458acc476aca0d1609cc6 /wiki
parentc506fecc8706e6e215d671672b2d213d0fb4b74b (diff)
downloadniri-d5a8074b5388518871a949093e34f44d735157e7.tar.gz
niri-d5a8074b5388518871a949093e34f44d735157e7.tar.bz2
niri-d5a8074b5388518871a949093e34f44d735157e7.zip
Add profile-with-tracy-ondemand feature
Finally this can be added without disabling frames. manual-lifetime is needed to avoid initializing Tracy for CLI commands, since that is quite slow.
Diffstat (limited to 'wiki')
-rw-r--r--wiki/Developing-niri.md15
1 files changed, 12 insertions, 3 deletions
diff --git a/wiki/Developing-niri.md b/wiki/Developing-niri.md
index f30bfb3c..8fd93e89 100644
--- a/wiki/Developing-niri.md
+++ b/wiki/Developing-niri.md
@@ -49,10 +49,19 @@ The `niri-visual-tests` sub-crate is a GTK application that runs hard-coded test
We have integration with the [Tracy](https://github.com/wolfpld/tracy) profiler which you can enable by building niri with a feature flag:
```
-cargo build --release --features=profile-with-tracy
+cargo build --release --features=profile-with-tracy-ondemand
```
-Then you can open Tracy (you will need the latest stable release) and attach to a running niri instance to collect profiling data. This is **not** currently "on-demand" (until the next Tracy release), so niri will always collect profiling data when compiled this way, and you can't run a build like this as your main compositor.
+Then you can open Tracy (you will need the latest stable release) and attach to a running niri instance to collect profiling data. Profiling data is collected "on demand"---that is, only when Tracy is connected. You can run a niri build like this as your main compositor if you'd like.
+
+> [!NOTE]
+> If you need to profile niri startup or the niri CLI, you can opt for "always on" profiling instead, using this feature flag:
+>
+> ```
+> cargo build --release --features=profile-with-tracy
+> ```
+>
+> When compiled this way, niri will **always** collect profiling data, so you can't run a build like this as your main compositor.
To make a niri function show up in Tracy, instrument it like this:
@@ -62,4 +71,4 @@ pub fn some_function() {
// Code of the function.
}
-``` \ No newline at end of file
+```