Skip to content

Commit 303cbaf

Browse files
authored
Update README.md
Fix README to mention support on Windows. @mstange can you also update the repo description to include Windows?
1 parent 75a8971 commit 303cbaf

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
samply is a command line CPU profiler which uses the [Firefox profiler](https://profiler.firefox.com/) as its UI.
44

5-
samply works on macOS and Linux. Windows support is planned.
5+
samply works on macOS, Linux, and Windows.
66

77
In order to profile the execution of `./my-application`, prepend `samply record` to the command invocation:
88

@@ -22,10 +22,16 @@ You have the following options to install samply:
2222

2323
### Install prebuilt binaries via shell script
2424

25+
macOS/Linux:
2526
```sh
2627
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mstange/samply/releases/download/samply-v0.12.0/samply-installer.sh | sh
2728
```
2829

30+
Windows:
31+
```
32+
powershell -c "irm https://github.com/mstange/samply/releases/download/samply-v0.12.0/samply-installer.ps1 | iex"
33+
```
34+
2935
### Install from crates.io with cargo
3036

3137
```sh
@@ -64,7 +70,7 @@ You can see which functions were running for how long. You can see flame graphs
6470

6571
All data is kept locally (on disk and in RAM) until you choose to upload your profile.
6672

67-
samply is a sampling profiler and collects stack traces, per thread, at some sampling interval (the default 1000Hz, i.e. 1ms). On macOS, both on- and off-cpu samples are collected (so you can see under which stack you were blocking on a lock, for example). On Linux, only on-cpu samples are collected at the moment.
73+
samply is a sampling profiler and collects stack traces, per thread, at some sampling interval (the default 1000Hz, i.e. 1ms). On macOS and Windows, both on- and off-cpu samples are collected (so you can see under which stack you were blocking on a lock, for example). On Linux, only on-cpu samples are collected at the moment.
6874

6975
On Linux, samply needs access to performance events system for unprivileged users. For this, you can either:
7076

@@ -122,7 +128,7 @@ Similar advice applies to other compiled languages. For C++, you'll want to make
122128

123129
On macOS, samply cannot profile system commands, such as the `sleep` command or system `python`. This is because system executables are signed in such a way that they block the `DYLD_INSERT_LIBRARIES` environment variable, which breaks samply's ability to siphon out the `mach_port` of the process.
124130

125-
But you can profile any binaries that you've compiled yourself, or which are unsigned or locally-signed (such as anything installed by `cargo install` or by [Homebrew](brew.sh)).
131+
But you can profile any binaries that you've compiled yourself, or which are unsigned or locally-signed (such as anything installed by `cargo install` or by [Homebrew](brew.sh)). In order to attach to running processes on macOS, run `samply setup` once (and every time `samply` is udpated) self-sign the samply binary.
126132

127133
## License
128134

0 commit comments

Comments
 (0)