summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <je@facebook.com>2010-04-02 23:05:37 (GMT)
committerJason Evans <je@facebook.com>2010-04-03 01:48:27 (GMT)
commita53610130d06fa55dd84031d127c8c46e3e44711 (patch)
tree681db9bde43256c1b991624781c3a358539e9a2f
parenta91f2109292f4f4522f75d0636fdba30bda26e76 (diff)
downloadjemalloc-a53610130d06fa55dd84031d127c8c46e3e44711.zip
jemalloc-a53610130d06fa55dd84031d127c8c46e3e44711.tar.gz
jemalloc-a53610130d06fa55dd84031d127c8c46e3e44711.tar.bz2
Use addr2line only for --line option (pprof).
-rwxr-xr-xjemalloc/bin/pprof3
1 files changed, 2 insertions, 1 deletions
diff --git a/jemalloc/bin/pprof b/jemalloc/bin/pprof
index 4f0f81d..7b39dc4 100755
--- a/jemalloc/bin/pprof
+++ b/jemalloc/bin/pprof
@@ -3725,7 +3725,8 @@ sub MapToSymbols {
# 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).
- if (system("$addr2line --help >/dev/null 2>&1") != 0) {
+ if ($main::opt_lines == 0 || system("$addr2line --help >/dev/null 2>&1")
+ != 0) {
MapSymbolsWithNM($image, $offset, $pclist, $symbols);
return;
}