summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam McNeeney <adam@meliorist.co.uk>2014-08-22 10:01:24 +0100
committerAliaksey Kandratsenka <alk@tut.by>2014-08-23 14:59:30 -0700
commitbbf346a856d4a7c5c2ab0e65d7cccf3dc1f23f13 (patch)
treef6d6b68f53c74a8f668f425175e5690832aa5305
parentb08d760958dbacc8da822f7f3db76d58c95a114d (diff)
downloadgperftools-bbf346a856d4a7c5c2ab0e65d7cccf3dc1f23f13.tar.gz
Cope with new addr2line outputs for DWARF4
Copes with ? for line number (converts to 0). Copes with (discriminator <num>) suffixes to file/linenum (removes). Change-Id: I96207165e4852c71d3512157864f12d101cdf44a
-rwxr-xr-xsrc/pprof6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pprof b/src/pprof
index 03e5806..ad21f07 100755
--- a/src/pprof
+++ b/src/pprof
@@ -4768,6 +4768,12 @@ sub MapToSymbols {
$filelinenum =~ s|\\|/|g; # turn windows-style paths into unix-style paths
+ # Remove discriminator markers as this comes after the line number and
+ # confuses the rest of this script.
+ $filelinenum =~ s/ \(discriminator \d+\)$//;
+ # Convert unknown line numbers into line 0.
+ $filelinenum =~ s/:\?$/:0/;
+
my $pcstr = $pclist->[$count];
my $function = ShortFunctionName($fullfunction);
my $nms = $nm_symbols->{$pcstr};