X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Porting%2Fvalgrindpp.pl;h=5078734dfb591515551326033e7e84e47ee9c8e3;hb=a6b599c70633c3b011aba1a198149d25707cbc98;hp=1e7c1f8d7883ff4d9cf62216d3a43423c14e40ab;hpb=520dabbaaba171b465ab123988cc8b2d1f18d7f0;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Porting/valgrindpp.pl b/Porting/valgrindpp.pl index 1e7c1f8..5078734 100644 --- a/Porting/valgrindpp.pl +++ b/Porting/valgrindpp.pl @@ -196,8 +196,16 @@ sub filter { debug(1, "processing $test ($_)\n"); # Get all the valgrind output lines - my @l = map { chomp; s/^==\d+==\s?//; $_ } - do { my $fh = new IO::File $_ or die "$0: cannot open $_ ($!)\n"; <$fh> }; + my @l = do { + my $fh = new IO::File $_ or die "$0: cannot open $_ ($!)\n"; + # Process outputs can interrupt each other, so sort by pid first + my %pid; local $_; + while (<$fh>) { + chomp; + s/^==(\d+)==\s?// and push @{$pid{$1}}, $_; + } + map @$_, values %pid; + }; # Setup some useful regexes my $hexaddr = '0x[[:xdigit:]]+';