-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
I just created a heap profile using go test -memprofile=x.prof. When I run pprof on it, the first line of output is:
Main binary filename not available.
I'm not 100% sure what this means, but it should not be printed. We just went through all the effort of making profiles stand alone so that the program binary is unnecessary for pprof's operation. The first thing it prints should not be a complaint about a file it does not need.
This print was introduced in Go 1.10:
$ go1.9 tool pprof x.prof
Type: alloc_space
Time: Jul 6, 2018 at 4:00pm (EDT)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof)
$ go1.10 tool pprof x.prof
Main binary filename not available.
Type: alloc_space
Time: Jul 6, 2018 at 4:00pm (EDT)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof)
Normally, a print introduced in Go 1.10 would not be a release blocker in Go 1.11. But now in Go 1.11 the print is in RED (or surrounded by line noise; see #26254):
$ go tool pprof x.prof
�[0;31mMain binary filename not available.
�[0mType: alloc_space
Type: alloc_space
Time: Jul 6, 2018 at 4:00pm (EDT)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof)
It's as though pprof REALLY wants us to know that it doesn't have a file it doesn't need. We made a big deal of not needing the main binary anymore. I don't want to confuse users with a spurious RED message.