Skip to content

Don't work -source_path flag in go tool pprof #472

@ilya-korotya

Description

@ilya-korotya

I try make profiling application via go tool pprof. I have profile.out from docker container. And I try run pprof locally:

go tool pprof -source_path=/home/korotya-ilya highloadcup_2018 profile.out

But when I try run list command I got error:

(pprof) list changeSymbol 
Total: 1.73s
ROUTINE ======================== github.com/ilya-korotya/highloadcup_2018/postgres.changeSymbol in /go/src/github.com/ilya-korotya/highloadcup_2018/postgres/init.go
         0      640ms (flat, cum) 36.99% of Total
 Error: open /go/src/github.com/ilya-korotya/highloadcup_2018/postgres/init.go: no such file or directory

Locally path to project: ~/go/src/github.com/ilya-korotya/highloadcup_2018

Local go env:

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/korotya-ilya/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/korotya-ilya/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build654244657=/tmp/go-build -gno-record-gcc-switches"

System:

Linux korotya-ilya 4.15.0-50-generic #54-Ubuntu SMP Mon May 6 18:46:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions