Skip to content

Commit

Permalink
Update summarizing script for memory dump results.
Browse files Browse the repository at this point in the history
v8 proved to be a very coarse bucket, and was too high up.
I've added several buckets, and put in a section for drilling
down on a specific bucket (contributions over a specific value).

r=mbelshe
Review URL: http://codereview.chromium.org/376003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31435 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jar@chromium.org committed Nov 9, 2009
1 parent 7dd8234 commit 470b989
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tools/memory_watcher/scripts/summary.pl
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ ()

if ($loc =~ m/v8::internal::Snapshot::Deserialize/) {
$location_blame = "v8 Snapshot Deserialize";
} elsif ($loc =~ m/RenderStyle::create/) {
$location_blame = "RenderStyle::create";
} elsif ($loc =~ m/v8::internal::OldSpace::SlowAllocateRaw/) {
$location_blame = "v8 OldSpace";
} elsif ($loc =~ m/v8/) {
$location_blame = "v8";
} elsif ($loc =~ m/sqlite/) {
$location_blame = "sqlite";
} elsif ($loc =~ m/ TransportDIB::Map/) {
Expand Down Expand Up @@ -115,15 +115,15 @@ ()
$location_blame = "history publisher";
} else {
$location_blame = "unknown";
# print "$location_blame: ($bytes) $loc\n";
}

# Surface large outliers in an "interesting" group.
# When questioned about a specific group listed above, we
# can just enter its name here, and get details.
my $interesting_group = "unknown";
my $interesting_size = 10000000; # Make this smaller as needed.
# TODO(jar): Add this as a pair of shell arguments.
if ($bytes > 10000000 && $location_blame eq "unknown") {
$location_blame = "\n" . $loc;
if ($bytes > $interesting_size && $location_blame eq $interesting_group) {
# Create a special group for the exact stack that contributed so much.
$location_blame = $loc;
}

$total_bytes += $bytes;
Expand All @@ -135,7 +135,7 @@ ()
my @keys = sort { $leaks{$b} <=> $leaks{$a} }keys %leaks;
for ($i=0; $i<@keys; $i++) {
my $key = @keys[$i];
printf "%11s\t%3.2f%%\t%s\n", comma_print($leaks{$key}), (100* $leaks{$key} / $total_bytes), $key;
printf "%11s\t(%3.2f%%)\t%s\n", comma_print($leaks{$key}), (100* $leaks{$key} / $total_bytes), $key;
$sum += $leaks{$key};
}
printf("TOTAL: %s\n", comma_print($sum));
Expand Down

0 comments on commit 470b989

Please sign in to comment.