Closed ilya-korotya closed 5 years ago
Does pprof included in the Go version you use support the -trim-path
option? If not, locating absolute paths won't work, you'll have to make sure the paths inside and outside the container match exactly (which is the easiest thing to do anyway, I think). Or use pprof
from head of this repo.
If you do use pprof
that supports the -trim-path
option, try something like -source-path=/home/korotya-ilya/go/src
, that should be enough to set -trim-path
to a good default using the basename heuristic. Or be more explicit as -trim-path=/go/src/ -source-path=/home/korotya-ilya/go/src/
.
Sorry. That's my fault. I did not notice that I have a missing -trim-path
flag. I close the issue.
@ilya-korotya
What does the final working cmd look like? Can you share it in full?
@ilya-korotya Hello, What does the final working cmd look like? Can you share it in full?
Thx, this worked for me: go tool pprof -trim_path=/build/ -source_path=~/app/ out.prof
I try make profiling application via
go tool pprof
. I haveprofile.out
fromdocker
container. And I try runpprof
locally:But when I try run
list
command I got error:Locally path to project:
~/go/src/github.com/ilya-korotya/highloadcup_2018
Local
go env
:System: