Changes
Page history
profiler code syntax update
authored
Feb 13, 2019
by
Sébastien Timmermans
Show whitespace changes
Inline
Side-by-side
profiling-on-linux-jonathan-lambrechts.md
View page @
74209062
## installer libprofiler.so
apt install libgoogle-perftools-dev
```
apt install libgoogle-perftools-dev
```
## installer un meilleurs pprof (grace a golang)
apt install golang
```
apt install golang
```
GOPATH=$HOME/go go get github.com/google/pprof
```
GOPATH=$HOME/go go get github.com/google/pprof
```
## Profile the ./myexe
LD_PRELOAD=/usr/lib/libprofiler.so CPUPROFILE=prof ./myexe
```
LD_PRELOAD=/usr/lib/libprofiler.so CPUPROFILE=prof ./myexe
```
Attention, le chemin d'accès jusqu'à libprofiler peut varier !
## show online the results
~/go/bin/pprof -http localhost:8000 prof
```
~/go/bin/pprof -http localhost:8000 prof
```
## The package graphViz is needed.
sudo apt install graphviz
```
sudo apt install graphviz
```
## use this line create a pdf :
~/go/bin/pprof -pdf prof > my_pdf_prof.pdf
```
~/go/bin/pprof -pdf prof > my_pdf_prof.pdf
```
and open it :
evince my_pdf_prof.pdf
```
evince my_pdf_prof.pdf
```