]> Cypherpunks repositories - gostls13.git/commitdiff
misc/pprof: fix address lookup regression on Linux
authorJeff R. Allen <jra@nella.org>
Wed, 13 Mar 2013 16:40:38 +0000 (09:40 -0700)
committerRob Pike <r@golang.org>
Wed, 13 Mar 2013 16:40:38 +0000 (09:40 -0700)
Just use "go tool addr2line" no matter what, since we know
it works for all OSs.

Fixes #4818.

R=rsc, r
CC=golang-dev
https://golang.org/cl/7526047

misc/pprof

index 1c66b871968ca502254105e32237a3d53d1734a4..f471c739511bbf44e34c923fcc62be4e8b28d262 100755 (executable)
@@ -4417,11 +4417,9 @@ sub MapToSymbols {
     $cmd = "$addr2line --demangle -f -C -e $image";
   }
 
-  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";
-  }
+  # Use the go version because we know it works on all platforms
+  $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).