-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version devel +3f69822 Wed Nov 23 04:29:25 2016 +0000 linux/amd64
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mvdan/go"
GORACE=""
GOROOT="/home/mvdan/tip"
GOTOOLDIR="/home/mvdan/tip/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build002913838=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
In any package with tests:
rm -r ~/pprof
go test -cpuprofile cpu.out
go tool pprof foo.test cpu.out
(do whatever, exit with ^D)
Note that it happens with exit/quit too.
What did you expect to see?
go tool pprof not cluttering my home directory.
What did you see instead?
An empty $HOME/pprof directory, just created:
drwxr-xr-x 1 mvdan mvdan 0 Nov 23 11:20 pprof/
I can submit a small patch to remove the directory if it's the correct fix. If the directory should be left behind for some reason, then I suggest it be a temporary directory under /tmp.
Reactions are currently unavailable