From a53610130d06fa55dd84031d127c8c46e3e44711 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Fri, 2 Apr 2010 16:05:37 -0700 Subject: [PATCH] Use addr2line only for --line option (pprof). --- jemalloc/bin/pprof | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jemalloc/bin/pprof b/jemalloc/bin/pprof index 4f0f81d9..7b39dc4e 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; }