You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"go tool pprof" seems to have regressed somehow.
bradfitz@bradfitzlap:~/go/test/bench/go1$ go test -c
....
bradfitz@bradfitzlap:~/go/test/bench/go1$ go tool pprof go1.test cpu.prof
usage: addr2line binary
reads addresses from standard input and writes two lines for each:
function name
file:line
Welcome to pprof! For help, type 'help'.
(pprof) top
Total: 187 samples
9 4.8% 4.8% 9 4.8% 000000000052ce95
6 3.2% 8.0% 6 3.2% 00000000004219eb
5 2.7% 10.7% 5 2.7% 0000000000410b31
3 1.6% 12.3% 3 1.6% 00000000004118a8
2 1.1% 13.4% 2 1.1% 0000000000410211
2 1.1% 14.4% 2 1.1% 00000000004119b9
2 1.1% 15.5% 2 1.1% 000000000041e697
2 1.1% 16.6% 2 1.1% 00000000004219e0
2 1.1% 17.6% 2 1.1% 00000000004219e5
2 1.1% 18.7% 2 1.1% 0000000000421c49
(pprof)
$ which addr2line
/usr/bin/addr2line
$ addr2line --version
GNU addr2line (GNU Binutils for Ubuntu) 2.22
$ go tool addr2line
usage: addr2line binary
reads addresses from standard input and writes two lines for each:
function name
file:line
If I modify misc/pprof:
diff -r f3ca7d5b1b0b misc/pprof
--- a/misc/pprof Tue Mar 12 17:12:56 2013 -0700
+++ b/misc/pprof Tue Mar 12 18:11:24 2013 -0700
@@ -4417,11 +4417,11 @@
$cmd = "$addr2line --demangle -f -C -e $image";
}
- if (system("$addr2line --help >/dev/null 2>&1") != 0) {
+ #if (system("$addr2line --help >/dev/null 2>&1") != 0) {
# addr2line must not exist. Fall back to go tool addr2line.
$addr2line = "go tool addr2line";
$cmd = "$addr2line $image";
- }
+ # }
# If "addr2line" isn't installed on the system at all, just use
# nm to get what info we can (function names, but not line numbers).
... then it works.
It seems we can't use the system addr2line anymore?
I don't know what the right fix is here but happy to send a CL if I'm told.
The text was updated successfully, but these errors were encountered:
I don't think I have observed any regression. My addr2line is:
GNU addr2line (GNU Binutils) 2.23.1
on Archlinux and I never had problems. What happens if you echo/pipe the hex addresses
into "addr2line -f -C -e go1.test" ?
A change went in to pprof this morning to make it use go tool addr2line always, but I am
concerned that this is indicative of a deeper problem. I don't understand why
addr2line's help message got printed to the console when you ran pprof, and I don't
understand why the system addr2line doesn't work with Go binaries anymore. Both of those
need to be investigated and fixed before Go 1.1.
I found that it was pprof line 4653 that was choosing Go's addr2line over the system
addr2line.
https://code.google.com/p/go/source/browse/misc/pprof#4653
But then it was trying to use Go's addr2line with the system options and causing the
help message. The fix I proposed this morning was to never try to use system options,
since pprof is always finding addr2line instead.
The text was updated successfully, but these errors were encountered: