-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
runtime: pprof list command not showing allocation in 1.9beta2 #21022
Comments
There must be something wrong with Darwin, because I can't reproduce this (nor #21023) on my Linux machine.
|
@ardan-bkennedy which Darwin version are you using? |
macOS Sierra 10.12.5 |
Thanks. I know about 10.10 issues (I opened an issue upstream because we were seeing builders failures in the pprof test suite) but since you're using 10.12 this could be something different. See and google/pprof#146 and google/pprof#156 (comment) |
This is the same problem as #21023. I've validated that it works fine if the binary is not specified in the command line:
|
Duplicate of #21023. Okay, closing. The release notes do say:
Maybe that should be amended to say "should" for now? |
Sorry, I don't really know. |
I agree the documentation should encourage the use of pprof without using the binary. |
Change https://golang.org/cl/50430 mentions this issue: |
What version of Go are you using (
go version
)?go version go1.9beta2 darwin/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/bill/code/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_v/4r515ktx08g5yr6dgkxhfyfr0000gn/T/go-build016620058=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
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"
Code to reproduce the bug?
https://github.com/ardanlabs/gotraining/tree/master/topics/go/profiling/memcpu
What did you do?
$ go test -run none -bench . -benchtime 3s -memprofile mem.out
$ go tool pprof -alloc_space memcpu.test mem.out
(pprof) list algOne
The allocation for
input
is not being reported in pprof but the escape analysis does confirm the escape.$ go build -gcflags "-m -m"
What did you expect to see?
go1.8.3 darwin/amd64
I have highlighted the line in the report for 1.8 where pprof shows
input
escaping to the heap. The escape analysis report also shows these allocations.$ go build -gcflags "-m -m"
What did you see instead?
In the 1.9 beta this particular allocation of the input value is not showing up on the pprof list call.
The text was updated successfully, but these errors were encountered: