Last Comment Bug 752381 - Merge System Principal compartments in about:memory
: Merge System Principal compartments in about:memory
Status: RESOLVED FIXED
[MemShrink]
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla15
Assigned To: Nicholas Nethercote [:njn]
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: 752259 752357
  Show dependency treegraph
 
Reported: 2012-05-06 17:15 PDT by Nicholas Nethercote [:njn]
Modified: 2012-05-07 16:13 PDT (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (3.23 KB, patch)
2012-05-06 18:01 PDT, Nicholas Nethercote [:njn]
justin.lebar+bug: review+
Details | Diff | Splinter Review

Description Nicholas Nethercote [:njn] 2012-05-06 17:15:38 PDT
Bug 672439 added addresses to the memory reporters of System Principal compartments so they weren't all lumped together.  But now that CPG creates 100s of such compartments at a drop of a hat, these addresses are making about:memory very hard to read.

Also, the sheer amount of text in about:memory -- every one of those hundreds of compartments gets up to 34 lines -- is perturbing the measurement greatly.  When I hit reload in about:memory repeatedly it bounces around sometimes as much as 100MB or more, which is ridiculous and renders about:memory almost unusable.

So I'm going to remove the addresses.  We have names for some system principal compartments (e.g. sandboxes) so they'll still be shown separately, which is good.
Comment 1 Nicholas Nethercote [:njn] 2012-05-06 17:40:45 PDT
> Also, the sheer amount of text in about:memory -- every one of those
> hundreds of compartments gets up to 34 lines -- is perturbing the
> measurement greatly.  When I hit reload in about:memory repeatedly it
> bounces around sometimes as much as 100MB or more, which is ridiculous and
> renders about:memory almost unusable.

Hmm, I wonder if this accounts for any of that 3--5% CPG overhead measured by bholley, luke and AWSY...
Comment 2 Nicholas Nethercote [:njn] 2012-05-06 18:01:55 PDT
Created attachment 621486 [details] [diff] [review]
patch

The patch is trivial.  Asking jlebar for review because this is more about about:memory than XPConnect.

Example output with the patch applied:

87,961,551 B (100.0%) -- explicit
├──48,332,712 B (54.95%) -- js
│  ├──37,104,064 B (42.18%) -- compartment([System Principal])
│  │  ├──26,374,144 B (29.98%) -- gc-heap
│  │  │  ├──13,024,304 B (14.81%) -- objects
│  │  │  │  ├──10,598,448 B (12.05%) ── non-function [112]
│  │  │  │  └───2,425,856 B (02.76%) ── function [109]
│  │  │  ├───5,714,480 B (06.50%) -- arena
│  │  │  │   ├──5,288,368 B (06.01%) ── unused [112]
│  │  │  │   ├────220,064 B (00.25%) ── padding [112]
│  │  │  │   └────206,048 B (00.23%) ── headers [112]
│  │  │  ├───3,171,200 B (03.61%) ── strings [80]
│  │  │  ├───3,083,448 B (03.51%) -- shapes
│  │  │  │   ├──1,673,800 B (01.90%) ── tree [112]
│  │  │  │   ├────785,640 B (00.89%) ── dict [109]
│  │  │  │   └────624,008 B (00.71%) ── base [112]
│  │  │  ├───1,274,520 B (01.45%) ── scripts [109]
│  │  │  ├─────106,032 B (00.12%) ── type-objects [112]
│  │  │  └─────────160 B (00.00%) ── xml
│  │  ├───3,672,704 B (04.18%) ── analysis-temporary [17]
│  │  ├───2,932,000 B (03.33%) ── script-data [109]
│  │  ├───2,074,336 B (02.36%) -- shapes-extra
│  │  │   ├────903,168 B (01.03%) ── compartment-tables [113]
│  │  │   ├────470,816 B (00.54%) ── tree-tables [50]
│  │  │   ├────357,248 B (00.41%) ── dict-tables [109]
│  │  │   └────343,104 B (00.39%) ── tree-shape-kids [109]
│  │  ├───1,453,808 B (01.65%) -- objects
│  │  │   ├────914,112 B (01.04%) ── slots [112]
│  │  │   ├────520,688 B (00.59%) ── elements [81]
│  │  │   └─────19,008 B (00.02%) ── misc [112]
│  │  ├─────434,128 B (00.49%) ── string-chars [80]
│  │  └─────162,944 B (00.19%) -- type-inference
│  │        ├──131,888 B (00.15%) ── script-main [69]
│  │        ├───23,904 B (00.03%) ── tables [6]
│  │        └────7,152 B (00.01%) ── object-main [5]
Comment 3 Andrew McCreight [:mccr8] 2012-05-06 18:03:23 PDT
Does it have a noticeable effect on how much memory the browser uses with just about:memory?verbose open?
Comment 4 Justin Lebar (not reading bugmail) 2012-05-06 19:55:32 PDT
I'm a bit concerned about the information that's being hidden.  There's a fragmentation concern with CPG that we can't analyze as effectively with this patch.

But we obviously need to do it, and we can address this concern when we need to analyze it.
Comment 5 Nicholas Nethercote [:njn] 2012-05-06 22:34:41 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/929610b0c428

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