Bug 56344 - Leaks Viewer should show how many bytes were leaked, not just how many allocations
Summary: Leaks Viewer should show how many bytes were leaked, not just how many alloca...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-14 16:54 PDT by Adam Roben (:aroben)
Modified: 2011-03-18 00:11 PDT (History)
1 user (show)

See Also:


Attachments
Show the number of leaked bytes, not just leaked allocations, in Leaks Viewer (5.98 KB, patch)
2011-03-17 23:12 PDT, Adam Roben (:aroben)
joepeck: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2011-03-14 16:54:32 PDT
It would be useful for Leaks Viewer to show how many bytes were leaked. (Currently it only shows how many allocations were leaked.) This would allow us to prioritize bigger leaks over smaller ones.
Comment 1 Adam Roben (:aroben) 2011-03-14 16:55:36 PDT
I think we could change the Self and Total columns to show bytes, and add the Calls column to show number of allocations.
Comment 2 Adam Roben (:aroben) 2011-03-17 23:12:10 PDT
Created attachment 86139 [details]
Show the number of leaked bytes, not just leaked allocations, in Leaks Viewer
Comment 3 Joseph Pecoraro 2011-03-17 23:35:51 PDT
Comment on attachment 86139 [details]
Show the number of leaked bytes, not just leaked allocations, in Leaks Viewer

View in context: https://bugs.webkit.org/attachment.cgi?id=86139&action=review

r=me, Nice!

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParserWorker.js:39
> +            var match = /Leak:.*\ssize=(\d+)\s/.exec(line);

Nit: It might be worth adding a start anchor? /^Leak.../
I don't think you'd ever get a false positive with the '=' string, but it might help matching against long lines.

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParserWorker.js:88
> +                    childNode.selfTime += leak.size;
> +                childNode.totalTime += leak.size;
> +                ++childNode.numberOfCalls;

These property names no longer make sense, and could be renamed
in the Worker code and converted later. But I understand your concerns
about performance. So I'm okay with these.
Comment 4 Adam Roben (:aroben) 2011-03-18 00:02:19 PDT
Committed r81445: <http://trac.webkit.org/changeset/81445>
Comment 5 Adam Roben (:aroben) 2011-03-18 00:11:07 PDT
And added the regexp anchor

Committed r81448: <http://trac.webkit.org/changeset/81448>