Index: Tools/Scripts/parse-malloc-history |
diff --git a/Tools/Scripts/parse-malloc-history b/Tools/Scripts/parse-malloc-history |
index 375203f95f591b19d56b6e40314bb9e2355aebc3..53ec3741fb6f12f50dd2c8ffc6096406eccecbbc 100755 |
--- a/Tools/Scripts/parse-malloc-history |
+++ b/Tools/Scripts/parse-malloc-history |
@@ -7,13 +7,13 @@ |
# are met: |
# |
# 1. Redistributions of source code must retain the above copyright |
-# notice, this list of conditions and the following disclaimer. |
+# notice, this list of conditions and the following disclaimer. |
# 2. Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
-# documentation and/or other materials provided with the distribution. |
+# documentation and/or other materials provided with the distribution. |
# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of |
# its contributors may be used to endorse or promote products derived |
-# from this software without specific prior written permission. |
+# from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
@@ -76,7 +76,7 @@ sub main() |
# First try malloc_history format |
# 6 calls for 664 bytes thread_ffffffff |0x0 | start |
($callCount, $byteCount) = ($line =~ /(\d+) calls for (\d+) bytes/); |
- |
+ |
# Then try leaks format |
# Leak: 0x0ac3ca40 size=48 |
# 0x00020001 0x00000001 0x00000000 0x00000000 ................ |
@@ -92,7 +92,7 @@ sub main() |
} |
} |
} |
- |
+ |
# Then try LeakFinder format |
# --------------- Key: 213813, 84 bytes --------- |
# c:\cygwin\home\buildbot\webkit\opensource\webcore\rendering\renderarena.cpp(78): WebCore::RenderArena::allocate |
@@ -110,14 +110,14 @@ sub main() |
unshift(@tempStack, $call); |
} |
$line = $lines[++$i]; |
- } |
+ } |
$line = join(" | ", @tempStack); |
} |
} |
- |
+ |
# Then give up |
next if (!$callCount || !$byteCount); |
- |
+ |
$byteCountTotal += $byteCount; |
next if ($grepRegexp && !($line =~ $grepRegexp)); |
@@ -143,7 +143,7 @@ sub main() |
last; |
} |
} |
- |
+ |
if (!$callstacks{$callstack}) { |
$callstacks{$callstack} = {"callCount" => 0, "byteCount" => 0}; |
} |