Skip to content

Commit

Permalink
docs: add notes on using Samply
Browse files Browse the repository at this point in the history
  • Loading branch information
wincent committed Oct 25, 2024
1 parent cd46c34 commit e739fa7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ I also attempted using the `/usr/bin/sample` tool, which produces results, albei
sample -wait luajit -mayDie
```

So far, `dtrace` is the only thing I've been able to get working usefully:
`dtrace`, however, produced a useful result, albeit with some hoop-jumping required:

```
sudo -v
Expand Down Expand Up @@ -196,6 +196,15 @@ cd FlameGraph
dwarfdump --uuid /opt/homebrew/bin/luajit # but not with this.
```

I also had success straightforwardly with [Samply](https://github.com/mstange/samply):

```
cargo install --locked samply
TIMES=1 ~/.cargo/bin/samply record luajit bin/benchmarks/matcher.lua
```

**Note:** Using `TIMES=1` because otherwise the generated `profile.json` is too big and crashes Chrome (but not Safari).

### Using PGO (Profile-Guided Optimizations)

Make a build that collects profiling data:
Expand Down

0 comments on commit e739fa7

Please sign in to comment.