| OLD | NEW |
| 1 #!/usr/bin/perl | 1 #!/usr/bin/perl |
| 2 | 2 |
| 3 # Copyright (C) 2007 Apple Inc. All rights reserved. | 3 # Copyright (C) 2007 Apple Inc. All rights reserved. |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions | 6 # modification, are permitted provided that the following conditions |
| 7 # are met: | 7 # are met: |
| 8 # | 8 # |
| 9 # 1. Redistributions of source code must retain the above copyright | 9 # 1. Redistributions of source code must retain the above copyright |
| 10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 while (!($line =~ "Call stack: ")) { | 89 while (!($line =~ "Call stack: ")) { |
| 90 $i++; | 90 $i++; |
| 91 $line = $lines[$i]; | 91 $line = $lines[$i]; |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 | 95 |
| 96 # Then try LeakFinder format | 96 # Then try LeakFinder format |
| 97 # --------------- Key: 213813, 84 bytes --------- | 97 # --------------- Key: 213813, 84 bytes --------- |
| 98 # c:\cygwin\home\buildbot\webkit\opensource\webcore\rendering\renderaren
a.cpp(78): WebCore::RenderArena::allocate | 98 # c:\cygwin\home\buildbot\webkit\opensource\webcore\rendering\renderaren
a.cpp(78): WebCore::RenderArena::allocate |
| 99 # c:\cygwin\home\buildbot\webkit\opensource\webcore\rendering\renderobje
ct.cpp(82): WebCore::RenderObject::operator new | 99 # c:\cygwin\home\buildbot\webkit\opensource\webcore\rendering\layoutobje
ct.cpp(82): WebCore::LayoutObject::operator new |
| 100 if (!$callCount || !$byteCount) { | 100 if (!$callCount || !$byteCount) { |
| 101 $callCount = 1; | 101 $callCount = 1; |
| 102 ($byteCount) = ($line =~ /Key: (?:\d+), (\d+) bytes/); | 102 ($byteCount) = ($line =~ /Key: (?:\d+), (\d+) bytes/); |
| 103 if ($byteCount) { | 103 if ($byteCount) { |
| 104 $line = $lines[++$i]; | 104 $line = $lines[++$i]; |
| 105 my @tempStack; | 105 my @tempStack; |
| 106 while ($lines[$i+1] !~ /^(?:-|\d)/) { | 106 while ($lines[$i+1] !~ /^(?:-|\d)/) { |
| 107 if ($line =~ /\): (.*)$/) { | 107 if ($line =~ /\): (.*)$/) { |
| 108 my $call = $1; | 108 my $call = $1; |
| 109 $call =~ s/\r$//; | 109 $call =~ s/\r$//; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 exit(main()); | 169 exit(main()); |
| 170 | 170 |
| 171 # Copied from perldoc -- please excuse the style | 171 # Copied from perldoc -- please excuse the style |
| 172 sub commify($) | 172 sub commify($) |
| 173 { | 173 { |
| 174 local $_ = shift; | 174 local $_ = shift; |
| 175 1 while s/^([-+]?\d+)(\d{3})/$1,$2/; | 175 1 while s/^([-+]?\d+)(\d{3})/$1,$2/; |
| 176 return $_; | 176 return $_; |
| 177 } | 177 } |
| OLD | NEW |