From 6eca6c64fabbff55c43a78537e466312524b3acd Mon Sep 17 00:00:00 2001 From: Aliaksey Kandratsenka Date: Sat, 1 Jul 2017 18:48:58 -0700 Subject: [PATCH] Revert "issue-654: [pprof] handle split text segments" This reverts commit 8c3dc52fcfe02412a529769a22cbc75388a5d368. People have reported issues with this so lets stay safe and use older even if less powerful code. --- src/pprof | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/pprof b/src/pprof index dae6421..9e18fc6 100755 --- a/src/pprof +++ b/src/pprof @@ -4511,7 +4511,6 @@ sub ParseLibraries { my $zero_offset = HexExtend("0"); my $buildvar = ""; - my $priorlib = ""; foreach my $l (split("\n", $map)) { if ($l =~ m/^\s*build=(.*)$/) { $buildvar = $1; @@ -4568,20 +4567,7 @@ sub ParseLibraries { } } - # If we find multiple executable segments for a single library, merge them - # into a single entry that spans the complete address range. - if ($lib eq $priorlib) { - my $prior = pop(@{$result}); - if ($start gt @$prior[1]) { - $start = @$prior[1]; - } else { - $finish = @$prior[2]; - } - # TODO $offset may be wrong if .text is not in the final segment. - } - push(@{$result}, [$lib, $start, $finish, $offset]); - $priorlib = $lib; } # Append special entry for additional library (not relocated)