Skip to content

Commit

Permalink
Document use of heaptrack for memory profiling on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsloan committed Nov 5, 2024
1 parent 282f624 commit 5eaea36
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/src/development/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,23 @@ To build & install the Flatpak package locally follow the steps below:
3. Run `script/flatpak/bundle-flatpak`.
4. Now the package has been installed and has a bundle available at `target/release/{app-id}.flatpak`.
## Memory profiling
[`heaptrack`](https://github.com/KDE/heaptrack) is quite useful for diagnosing memory leaks. To install it:
```sh
$ sudo apt install heaptrack heaptrack-gui
$ cargo install cargo-heaptrack
```
Then, to build and run Zed with the profiler attached:
```sh
$ cargo heaptrack -b zed
```
The output will include a path to a `*.zst` file which can then be passed to `heaptrack_gui` for analysis.
## Troubleshooting
### Can't compile Zed
Expand Down

0 comments on commit 5eaea36

Please sign in to comment.