Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/pprof: module version suffix shown in graphs instead of package name #37825

Closed
zikaeroh opened this issue Mar 12, 2020 · 6 comments
Closed

cmd/pprof: module version suffix shown in graphs instead of package name #37825

zikaeroh opened this issue Mar 12, 2020 · 6 comments

Comments

@zikaeroh
Copy link
Contributor

@zikaeroh zikaeroh commented Mar 12, 2020

What version of Go are you using (go version)?

$ go version
go version go1.14 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jake/.cache/go-build"
GOENV="/home/jake/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/jake/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/jake/zikaeroh/hortbot/hortbot/go.mod"
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-build332050882=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.14 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.14
uname -sr: Linux 5.5.7-zen1-1-zen
/usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.31.
gdb --version: GNU gdb (GDB) 9.1

What did you do?

Created a profile, and opened it with go tool pprof to view a graph of memory allocations.

What did you expect to see?

Nodes with package names.

What did you see instead?

Packages which are at the root of a non-v1 module show their version suffix rather than their actual package name, making it more difficult to determine what they are.

For example, jackc's pgx/pgconn, which are at v4 and v2 respectively:

image

It looks like pprof just takes the last element of the import path, which used to be somewhat accurate (ignoring path/package name differences), but is less so now.

@zikaeroh
Copy link
Contributor Author

@zikaeroh zikaeroh commented Mar 12, 2020

I'm unsure if this should be here or https://github.com/google/pprof (or maybe both). I don't think that there's enough info in the profiles for pprof to actually know it should remove a version suffix. I'll defer that to someone who knows better where the change would need to be made.

@bcmills
Copy link
Member

@bcmills bcmills commented Mar 12, 2020

@hyangah
Copy link
Contributor

@hyangah hyangah commented Mar 12, 2020

github.com/google/pprof is a better place to discuss visualization and presenting Go's package name. I wished I could transfer this issue but couldn't. @zikaeroh can you open this in the upstream repo?

fyi @aalexand @nolanmar511

@zikaeroh
Copy link
Contributor Author

@zikaeroh zikaeroh commented Mar 12, 2020

Sure, I'll do that.

@zikaeroh
Copy link
Contributor Author

@zikaeroh zikaeroh commented Mar 12, 2020

Filed google/pprof#515. I'll close this one.

@zikaeroh zikaeroh closed this Mar 12, 2020
@zikaeroh
Copy link
Contributor Author

@zikaeroh zikaeroh commented Mar 12, 2020

Meant google/pprof#515, of course. Forgot the repo name. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.