mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 05:58:16 +00:00
Port improved pt-pmp
- Variable scope fixes
This commit is contained in:
@@ -8,10 +8,10 @@ use strict;
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
my $mmap;
|
my $mmap;
|
||||||
my $FH;
|
|
||||||
|
|
||||||
sub load_mapping {
|
sub load_mapping {
|
||||||
my ($pid)= @_;
|
my ($pid)= @_;
|
||||||
|
my $FH;
|
||||||
|
|
||||||
if ($pid =~ /^[0-9]+$/) {
|
if ($pid =~ /^[0-9]+$/) {
|
||||||
open $FH, '<', "/proc/$pid/maps"
|
open $FH, '<', "/proc/$pid/maps"
|
||||||
@@ -43,8 +43,7 @@ sub get_image {
|
|||||||
die "Global memory map is undefined or not an array reference"
|
die "Global memory map is undefined or not an array reference"
|
||||||
unless defined $mmap and ref($mmap) eq 'ARRAY';
|
unless defined $mmap and ref($mmap) eq 'ARRAY';
|
||||||
|
|
||||||
my $e;
|
for my $e (@$mmap) {
|
||||||
for $e (@$mmap) {
|
|
||||||
next if $e->{E} <= $addr;
|
next if $e->{E} <= $addr;
|
||||||
last if $e->{S} > $addr;
|
last if $e->{S} > $addr;
|
||||||
# Found, look up.
|
# Found, look up.
|
||||||
|
Reference in New Issue
Block a user