... | @@ -6,7 +6,8 @@ |
... | @@ -6,7 +6,8 @@ |
|
|
|
|
|
``` GOPATH=$HOME/go go get github.com/google/pprof```
|
|
``` GOPATH=$HOME/go go get github.com/google/pprof```
|
|
|
|
|
|
Be careful, an error may occur `undefined os.UserConfigDir`. In this case, you will have to update the go version or use an older version of pprof.
|
|
Be careful, an error may occur `undefined os.UserConfigDir`. In this case, you will have to update the go version or use an older version of pprof. see [this ink](https://github.com/google/pprof/issues/538).
|
|
|
|
It seems that `sudo apt install golang-go` works :-)
|
|
|
|
|
|
## Profile the ./myexe
|
|
## Profile the ./myexe
|
|
```LD_PRELOAD=/usr/lib/libprofiler.so CPUPROFILE=prof ./myexe```
|
|
```LD_PRELOAD=/usr/lib/libprofiler.so CPUPROFILE=prof ./myexe```
|
... | | ... | |