Skip to content

Commit

Permalink
add descriptions about generating flamegraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
sj-i committed Aug 2, 2021
1 parent 079dd26 commit 638ed72
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ docker build -t php-profiler .
docker run -it --security-opt="apparmor=unconfined" --cap-add=SYS_PTRACE --pid=host php-profiler:latest vendor/bin/php-profiler inspector:trace -p <pid of the target process or thread>
```

### Generate flamegraphs from traces
```
sudo php ./php-profiler inspector:trace -p <pid of the target process or thread> >traces
./tools/stackcollapse-phpspy/stackcollapse-phpspy.pl <traces | ./tools/flamegraph/flamegraph.pl >flame.svg
```

# LICENSE
- MIT (mostly)
- Some C headers defining internal structures are extracted from php-src. They are licensed under the zend engine license. See src/Lib/PhpInternals/Headers . So here are the words required by the zend engine license.
Expand Down

0 comments on commit 638ed72

Please sign in to comment.