wiki: Add kernel tracing remount & paranoid cmd for profiling
Browse files at this commit1697ba5662cda473add5effc2707c4a053b948aeParent: 2f87f381 changed file +6 -0
docs/wiki/Development:-Developing-niri.mdmodified+6 -0
| @@ -52,6 +52,12 @@ We have integration with the [Tracy](https://github.com/wolfpld/tracy) profiler | ||
| 52 | 52 | cargo build --release --features=profile-with-tracy-ondemand |
| 53 | 53 | ``` |
| 54 | 54 | |
| 55 | +Before starting Tracy-integrated niri, run the following commands to give Tracy access to CPU scheduling and context switches (can be very useful for diagnosing slowdowns): | |
| 56 | + | |
| 57 | +``` | |
| 58 | +sudo mount -o remount,gid=$(id -g),mode=750 /sys/kernel/tracing; echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid | |
| 59 | +``` | |
| 60 | + | |
| 55 | 61 | 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. |
| 56 | 62 | |
| 57 | 63 | > [!NOTE] |