Revert "issue-654: [pprof] handle split text segments"
This reverts commit 8c3dc52fcf
.
People have reported issues with this so lets stay safe and use older
even if less powerful code.
This commit is contained in:
parent
a495969cb6
commit
6eca6c64fa
14
src/pprof
14
src/pprof
|
@ -4511,7 +4511,6 @@ sub ParseLibraries {
|
||||||
my $zero_offset = HexExtend("0");
|
my $zero_offset = HexExtend("0");
|
||||||
|
|
||||||
my $buildvar = "";
|
my $buildvar = "";
|
||||||
my $priorlib = "";
|
|
||||||
foreach my $l (split("\n", $map)) {
|
foreach my $l (split("\n", $map)) {
|
||||||
if ($l =~ m/^\s*build=(.*)$/) {
|
if ($l =~ m/^\s*build=(.*)$/) {
|
||||||
$buildvar = $1;
|
$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]);
|
push(@{$result}, [$lib, $start, $finish, $offset]);
|
||||||
$priorlib = $lib;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Append special entry for additional library (not relocated)
|
# Append special entry for additional library (not relocated)
|
||||||
|
|
Loading…
Reference in New Issue