Last Comment Bug 683149 - Break out layout memory reporters on a per-shell basis
: Break out layout memory reporters on a per-shell basis
Status: RESOLVED FIXED
[MemShrink:P2]
:
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla9
Assigned To: Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
:
: Jet Villegas (:jet)
Mentors:
Depends on: 684323
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-30 07:00 PDT by Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
Modified: 2011-09-02 12:49 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (5.81 KB, patch)
2011-08-30 07:00 PDT, Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
bzbarsky: review+
Details | Diff | Splinter Review
Screenshot (24.09 KB, image/png)
2011-08-30 07:01 PDT, Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
no flags Details

Description Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-08-30 07:00:24 PDT
Created attachment 556825 [details] [diff] [review]
Patch
Comment 1 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-08-30 07:01:02 PDT
Created attachment 556826 [details]
Screenshot
Comment 2 Boris Zbarsky [:bz] (still a bit busy) 2011-08-30 14:17:45 PDT
Comment on attachment 556825 [details] [diff] [review]
Patch

>+  nsCAutoString str;
>+  str.AssignLiteral("explicit/layout/shell(");

  nsCAutoString str("explicit/layout/shell(");

Seems clearer.

r=me
Comment 3 Nicholas Nethercote [:njn] 2011-08-30 16:23:42 PDT
Comment on attachment 556825 [details] [diff] [review]
Patch

Review of attachment 556825 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/base/nsPresShell.cpp
@@ +1469,5 @@
> +
> +      // A hack: replace forward slashes with '\\' so they aren't
> +      // treated as path separators.  Users of the reporters
> +      // (such as about:memory) have to undo this change.
> +      spec.ReplaceChar('/', '\\');

Oh god, this code is going to end up being cut+pasted in half a dozen places eventually :(
Comment 4 Nicholas Nethercote [:njn] 2011-08-30 16:42:53 PDT
khuey, can you post sample output from about:memory?
Comment 5 Nicholas Nethercote [:njn] 2011-08-30 16:43:03 PDT
*** Bug 674922 has been marked as a duplicate of this bug. ***
Comment 6 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-08-31 03:24:47 PDT
(In reply to Nicholas Nethercote [:njn] from comment #4)
> khuey, can you post sample output from about:memory?

See the screenshot?
Comment 7 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-08-31 08:13:00 PDT
http://hg.mozilla.org/mozilla-central/rev/94b987001b38
Comment 8 Nicholas Nethercote [:njn] 2011-08-31 20:53:32 PDT
> See the screenshot?

Oh!  Nice.  One thing I've partly done with JS and am thinking about doing more consistently is to use the "Other measurements" list to aggregate these per-compartment/URI/whatever measurements.  In other words, it would be interesting to have "layout/styledata" and "layout/arenas" totals in "other measurements", to save you having to manually add up the individual counts.

Also, any reason you didn't use "style-data"? :)

Note You need to log in before you can comment on or make changes to this bug.