summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/parse-malloc-history
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/parse-malloc-history')
-rwxr-xr-xWebKitTools/Scripts/parse-malloc-history24
1 files changed, 22 insertions, 2 deletions
diff --git a/WebKitTools/Scripts/parse-malloc-history b/WebKitTools/Scripts/parse-malloc-history
index 76ca74b..177de1c 100755
--- a/WebKitTools/Scripts/parse-malloc-history
+++ b/WebKitTools/Scripts/parse-malloc-history
@@ -70,8 +70,6 @@ sub main()
for (my $i = 0; $i < @file; $i++) {
my $line = $file[$i];
my ($callCount, $byteCount);
-
- next if $line =~ /^\-/;
# First try malloc_history format
# 6 calls for 664 bytes thread_ffffffff |0x0 | start
@@ -93,6 +91,28 @@ sub main()
}
}
+ # Then try LeakFinder format
+ # --------------- Key: 213813, 84 bytes ---------
+ # c:\cygwin\home\buildbot\webkit\opensource\webcore\rendering\renderarena.cpp(78): WebCore::RenderArena::allocate
+ # c:\cygwin\home\buildbot\webkit\opensource\webcore\rendering\renderobject.cpp(82): WebCore::RenderObject::operator new
+ if (!$callCount || !$byteCount) {
+ $callCount = 1;
+ ($byteCount) = ($line =~ /Key: (?:\d+), (\d+) bytes/);
+ if ($byteCount) {
+ $line = $file[++$i];
+ my @tempStack;
+ while ($file[$i+1] !~ /^(?:-|\d)/) {
+ if ($line =~ /\): (.*)$/) {
+ my $call = $1;
+ $call =~ s/\r$//;
+ unshift(@tempStack, $call);
+ }
+ $line = $file[++$i];
+ }
+ $line = join(" | ", @tempStack);
+ }
+ }
+
# Then give up
next if (!$callCount || !$byteCount);