Closed Bug 819690 Opened 12 years ago Closed 8 months ago

High heap-unclassified running Dromaeo DOM Modification

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Windows 7
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: guijoselito, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [MemShrink:P2])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20121208 Firefox/20.0
Build ID: 20121208030937

Steps to reproduce:

While running DOM Core Tests I noticied Nightly consuming a lot of memory (using Task Manager). Then I went to about:memory and got a high percentage of heap-unclassified.

I re-did the test to get the exact moment of very high heap-unclassified, because it last just a few seconds close to the end of Dom Modification. All the other tests don't make Nightly use a lot of memory.


Actual results:

My about:memory

Main Process

Explicit Allocations
477.75 MB (100.0%) -- explicit
├──301.17 MB (63.04%) ── heap-unclassified
├──103.83 MB (21.73%) -- js-non-window
│  ├───55.71 MB (11.66%) -- compartments
│  │   ├──49.17 MB (10.29%) -- non-window-global
│  │   │  ├──25.12 MB (05.26%) -- compartment([System Principal], jar:file:///C:/Users/Guilherme/AppData/Roaming/Mozilla/Firefox/Profiles/jpeirp20.Teste/extensions/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D.xpi!/bootstrap.js (from: resource://gre/modules/XPIProvider.jsm:3650))
│  │   │  │  ├──14.05 MB (02.94%) -- gc-heap
│  │   │  │  │  ├───8.64 MB (01.81%) ++ (6 tiny)
│  │   │  │  │  └───5.41 MB (01.13%) ── unused-gc-things
│  │   │  │  ├───6.19 MB (01.29%) ++ (7 tiny)
│  │   │  │  └───4.89 MB (01.02%) -- string-chars
│  │   │  │      ├──4.87 MB (01.02%) ── non-huge
│  │   │  │      └──0.02 MB (00.00%) ++ huge
│  │   │  └──24.05 MB (05.03%) ++ (194 tiny)
│  │   └───6.54 MB (01.37%) -- no-global
│  │       ├──6.39 MB (01.34%) ++ compartment(atoms)
│  │       └──0.15 MB (00.03%) ++ (2 tiny)
│  ├───41.82 MB (08.75%) -- gc-heap
│  │   ├──22.50 MB (04.71%) ── unused-arenas
│  │   ├──16.02 MB (03.35%) ── decommitted-arenas
│  │   └───3.30 MB (00.69%) ++ (2 tiny)
│  └────6.30 MB (01.32%) ++ runtime
├───31.89 MB (06.67%) -- window-objects
│   ├───8.19 MB (01.71%) ++ (5 tiny)
│   ├───7.54 MB (01.58%) ++ top(http://dromaeo.com/?dom, id=68)/active
│   ├───5.99 MB (01.25%) ++ top(https://www.facebook.com/, id=19)/active/window(https://www.facebook.com/)
│   ├───5.14 MB (01.08%) -- top(chrome://browser/content/browser.xul, id=3)/active
│   │   ├──5.00 MB (01.05%) ++ window(chrome://browser/content/browser.xul)
│   │   └──0.15 MB (00.03%) ++ window(about:blank)
│   └───5.03 MB (01.05%) ++ top(https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1&ltmpl=default&ltmplcache=2&hl=pt-BR, id=15)/active
├───14.90 MB (03.12%) -- storage
│   ├──13.35 MB (02.79%) -- sqlite
│   │  ├───7.02 MB (01.47%) -- places.sqlite
│   │  │   ├──6.78 MB (01.42%) ── cache-used [3]
│   │  │   └──0.24 MB (00.05%) ++ (2 tiny)
│   │  └───6.33 MB (01.32%) ++ (10 tiny)
│   └───1.54 MB (00.32%) ++ prefixset
├───11.50 MB (02.41%) -- cycle-collector
│   ├──11.48 MB (02.40%) ── purple-buffer
│   └───0.02 MB (00.00%) ── collector-object
├────8.46 MB (01.77%) ++ (14 tiny)
└────6.01 MB (01.26%) -- layout
     ├──5.80 MB (01.21%) ── style-sheet-service
     └──0.21 MB (00.04%) ── style-sheet-cache

Other Measurements
246 (100.0%) -- js-compartments
├──222 (90.24%) ── system
└───24 (09.76%) ── user

121.63 MB (100.0%) -- js-main-runtime
├───73.52 MB (60.44%) -- compartments
│   ├──43.18 MB (35.50%) -- gc-heap
│   │  ├──20.12 MB (16.54%) ── unused-gc-things
│   │  ├───9.26 MB (07.61%) -- objects
│   │  │   ├──4.11 MB (03.38%) ── function
│   │  │   ├──2.76 MB (02.27%) ── ordinary
│   │  │   ├──2.26 MB (01.86%) ── dense-array
│   │  │   └──0.12 MB (00.10%) ── cross-compartment-wrapper
│   │  ├───6.87 MB (05.65%) -- shapes
│   │  │   ├──3.32 MB (02.73%) ── dict
│   │  │   ├──1.92 MB (01.58%) -- tree
│   │  │   │  ├──1.70 MB (01.40%) ── global-parented
│   │  │   │  └──0.22 MB (00.18%) ── non-global-parented
│   │  │   └──1.62 MB (01.33%) ── base
│   │  ├───4.49 MB (03.69%) -- strings
│   │  │   ├──3.37 MB (02.77%) ── normal
│   │  │   └──1.12 MB (00.92%) ── short
│   │  ├───2.00 MB (01.64%) ── scripts
│   │  └───0.46 MB (00.38%) ++ (3 tiny)
│   ├───9.46 MB (07.78%) -- string-chars
│   │   ├──8.95 MB (07.36%) ── non-huge
│   │   └──0.52 MB (00.42%) ++ huge
│   ├───5.89 MB (04.84%) -- objects-extra
│   │   ├──5.24 MB (04.30%) ── slots
│   │   └──0.66 MB (00.54%) ++ (2 tiny)
│   ├───5.77 MB (04.75%) -- shapes-extra
│   │   ├──3.96 MB (03.25%) ── compartment-tables
│   │   └──1.82 MB (01.49%) ++ (3 tiny)
│   ├───5.56 MB (04.57%) ── script-data
│   ├───2.63 MB (02.16%) -- type-inference
│   │   ├──1.66 MB (01.36%) ── analysis-pool
│   │   └──0.97 MB (00.80%) ++ (4 tiny)
│   └───1.02 MB (00.84%) ++ (6 tiny)
├───41.82 MB (34.38%) -- gc-heap
│   ├──22.50 MB (18.50%) ── unused-arenas
│   ├──16.02 MB (13.17%) ── decommitted-arenas
│   ├───2.00 MB (01.64%) ── unused-chunks
│   └───1.30 MB (01.07%) ── chunk-admin
└────6.30 MB (05.18%) ── runtime

68.98 MB (100.0%) -- js-main-runtime-gc-heap-committed
├──44.61 MB (64.68%) -- unused
│  ├──22.50 MB (32.61%) ── arenas
│  ├──20.12 MB (29.16%) ── gc-things
│  └───2.00 MB (02.90%) ── chunks
└──24.36 MB (35.32%) -- used
   ├──22.83 MB (33.09%) ── gc-things
   ├───1.30 MB (01.88%) ── chunk-admin
   └───0.24 MB (00.35%) ── arena-admin

0 (100.0%) -- low-memory-events
├──0 (100.0%) ── physical
└──0 (100.0%) ── virtual

14.08 MB (100.0%) -- window-objects
├───8.66 MB (61.53%) -- layout
│   ├──7.18 MB (50.99%) ── style-sets
│   ├──0.66 MB (04.69%) ── pres-shell
│   ├──0.34 MB (02.43%) ── frames
│   ├──0.30 MB (02.15%) ++ (4 tiny)
│   └──0.18 MB (01.27%) ── style-contexts
├───3.28 MB (23.30%) -- dom
│   ├──1.75 MB (12.44%) ── element-nodes
│   ├──1.31 MB (09.27%) ── text-nodes
│   ├──0.20 MB (01.40%) ── other
│   └──0.03 MB (00.18%) ++ (3 tiny)
├───2.12 MB (15.08%) ── style-sheets
└───0.01 MB (00.10%) ── property-tables

  0.00 MB ── canvas-2d-pixel-bytes
477.85 MB ── explicit
  0.00 MB ── gfx-d2d-surfacecache
  4.04 MB ── gfx-d2d-surfacevram
  8.04 MB ── gfx-d2d-vram-drawtarget
  0.14 MB ── gfx-d2d-vram-sourcesurface
  0.23 MB ── gfx-surface-image
        0 ── ghost-windows
390.43 MB ── heap-allocated
405.54 MB ── heap-committed
 15.07 MB ── heap-committed-unused
    3.85% ── heap-committed-unused-ratio
  2.00 MB ── heap-dirty
 33.53 MB ── heap-unused
  0.04 MB ── images-content-used-uncompressed
 85.00 MB ── js-gc-heap
        0 ── low-commit-space-events
641.95 MB ── private
645.82 MB ── resident
 13.35 MB ── storage-sqlite
997.29 MB ── vsize
If I recall correctly dom-modify creates huge DOM trees.  So if there's any sort of DOM thing we're failing to measure, it could show up like this...

I assume this is reproducible by just running http://dromaeo.com/?dom-mod&numTests=1 ?
With the test lasting only 6s seconds it's way harder to reproduce, but eventually I got it: 

Main Process

Explicit Allocations
326.64 MB (100.0%) -- explicit
├──149.72 MB (45.84%) ── heap-unclassified
├──114.55 MB (35.07%) -- js-non-window
│  ├───56.81 MB (17.39%) -- gc-heap
│  │   ├──24.00 MB (07.35%) ── unused-chunks
│  │   ├──16.39 MB (05.02%) ── decommitted-arenas
│  │   ├──15.29 MB (04.68%) ── unused-arenas
│  │   └───1.13 MB (00.34%) ── chunk-admin
│  ├───51.37 MB (15.73%) -- compartments
│  │   ├──44.97 MB (13.77%) -- non-window-global
│  │   │  ├──24.13 MB (07.39%) -- compartment([System Principal], jar:file:///C:/Users/Guilherme/AppData/Roaming/Mozilla/Firefox/Profiles/jpeirp20.Teste/extensions/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D.xpi!/bootstrap.js (from: resource://gre/modules/XPIProvider.jsm:3650))
│  │   │  │  ├──13.54 MB (04.14%) -- gc-heap
│  │   │  │  │  ├───5.00 MB (01.53%) ── unused-gc-things
│  │   │  │  │  ├───4.66 MB (01.43%) ++ (5 tiny)
│  │   │  │  │  └───3.88 MB (01.19%) ++ objects
│  │   │  │  ├───4.89 MB (01.50%) -- string-chars
│  │   │  │  │   ├──4.87 MB (01.49%) ── non-huge
│  │   │  │  │   └──0.02 MB (00.00%) ++ huge
│  │   │  │  ├───4.11 MB (01.26%) -- objects-extra
│  │   │  │  │   ├──3.68 MB (01.13%) ── slots
│  │   │  │  │   └──0.43 MB (00.13%) ── elements
│  │   │  │  └───1.59 MB (00.49%) ++ (5 tiny)
│  │   │  └──20.84 MB (06.38%) ++ (177 tiny)
│  │   └───6.40 MB (01.96%) -- no-global
│  │       ├──6.09 MB (01.87%) -- compartment(atoms)
│  │       │  ├──3.76 MB (01.15%) -- string-chars
│  │       │  │  ├──3.70 MB (01.13%) ── non-huge
│  │       │  │  └──0.05 MB (00.02%) ++ huge
│  │       │  └──2.34 MB (00.71%) ++ (2 tiny)
│  │       └──0.31 MB (00.09%) ++ (6 tiny)
│  └────6.38 MB (01.95%) -- runtime
│       ├──4.00 MB (01.22%) ── atoms-table
│       └──2.38 MB (00.73%) ++ (13 tiny)
├───26.91 MB (08.24%) -- window-objects
│   ├───5.85 MB (01.79%) ++ top(https://www.facebook.com/, id=17)/active/window(https://www.facebook.com/)
│   ├───4.90 MB (01.50%) ++ top(https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1&ltmpl=default&ltmplcache=2&hl=pt-BR, id=13)/active
│   ├───4.37 MB (01.34%) -- top(chrome://browser/content/browser.xul, id=3)/active
│   │   ├──4.22 MB (01.29%) ++ window(chrome://browser/content/browser.xul)
│   │   └──0.15 MB (00.05%) ++ window(about:blank)
│   ├───4.09 MB (01.25%) ++ top(http://dromaeo.com/?dom-mod&numTests=1, id=19)/active
│   ├───3.73 MB (01.14%) ++ top(about:memory, id=8)/active
│   ├───3.47 MB (01.06%) ++ top(http://forums.mozillazine.org/viewforum.php?f=23, id=15)/active/window(http://forums.mozillazine.org/viewforum.php?f=23)
│   └───0.51 MB (00.16%) ++ (3 tiny)
├───10.68 MB (03.27%) -- cycle-collector
│   ├──10.66 MB (03.26%) ── purple-buffer
│   └───0.02 MB (00.01%) ── collector-object
├────9.77 MB (02.99%) -- storage
│    ├──8.23 MB (02.52%) ++ sqlite
│    └──1.55 MB (00.47%) ++ prefixset
├────9.00 MB (02.76%) ++ (15 tiny)
└────6.01 MB (01.84%) -- layout
     ├──5.80 MB (01.78%) ── style-sheet-service
     └──0.21 MB (00.06%) ── style-sheet-cache

Other Measurements
234 (100.0%) -- js-compartments
├──212 (90.60%) ── system
└───22 (09.40%) ── user

129.11 MB (100.0%) -- js-main-runtime
├───65.92 MB (51.06%) -- compartments
│   ├──39.19 MB (30.36%) -- gc-heap
│   │  ├──17.71 MB (13.72%) ── unused-gc-things
│   │  ├───8.58 MB (06.65%) -- objects
│   │  │   ├──3.55 MB (02.75%) ── function
│   │  │   ├──2.67 MB (02.07%) ── ordinary
│   │  │   ├──2.26 MB (01.75%) ── dense-array
│   │  │   └──0.11 MB (00.08%) ── cross-compartment-wrapper
│   │  ├───6.15 MB (04.77%) -- shapes
│   │  │   ├──3.05 MB (02.36%) ── dict
│   │  │   ├──1.74 MB (01.35%) -- tree
│   │  │   │  ├──1.54 MB (01.20%) ── global-parented
│   │  │   │  └──0.20 MB (00.16%) ── non-global-parented
│   │  │   └──1.36 MB (01.05%) ── base
│   │  ├───4.43 MB (03.43%) -- strings
│   │  │   ├──3.32 MB (02.57%) ── normal
│   │  │   └──1.11 MB (00.86%) ── short
│   │  ├───1.89 MB (01.47%) ── scripts
│   │  └───0.42 MB (00.33%) ++ (3 tiny)
│   ├───9.11 MB (07.05%) -- string-chars
│   │   ├──8.80 MB (06.82%) ── non-huge
│   │   └──0.31 MB (00.24%) ++ huge
│   ├───5.72 MB (04.43%) -- objects-extra
│   │   ├──5.07 MB (03.93%) ── slots
│   │   └──0.65 MB (00.51%) ++ (2 tiny)
│   ├───5.30 MB (04.10%) ── script-data
│   ├───4.93 MB (03.82%) -- shapes-extra
│   │   ├──3.28 MB (02.54%) ── compartment-tables
│   │   └──1.65 MB (01.28%) ++ (3 tiny)
│   └───1.67 MB (01.29%) ++ (7 tiny)
├───56.81 MB (44.00%) -- gc-heap
│   ├──24.00 MB (18.59%) ── unused-chunks
│   ├──16.39 MB (12.70%) ── decommitted-arenas
│   ├──15.29 MB (11.85%) ── unused-arenas
│   └───1.13 MB (00.87%) ── chunk-admin
└────6.38 MB (04.94%) ── runtime

79.61 MB (100.0%) -- js-main-runtime-gc-heap-committed
├──57.00 MB (71.60%) -- unused
│  ├──24.00 MB (30.15%) ── chunks
│  ├──17.71 MB (22.24%) ── gc-things
│  └──15.29 MB (19.21%) ── arenas
└──22.61 MB (28.40%) -- used
   ├──21.27 MB (26.71%) ── gc-things
   ├───1.13 MB (01.41%) ── chunk-admin
   └───0.22 MB (00.27%) ── arena-admin

0 (100.0%) -- low-memory-events
├──0 (100.0%) ── physical
└──0 (100.0%) ── virtual

12.37 MB (100.0%) -- window-objects
├───8.58 MB (69.40%) -- layout
│   ├──7.18 MB (58.04%) ── style-sets
│   ├──0.62 MB (05.01%) ── pres-shell
│   ├──0.34 MB (02.71%) ── frames
│   ├──0.17 MB (01.34%) ── style-contexts
│   ├──0.16 MB (01.30%) ++ (3 tiny)
│   └──0.12 MB (01.00%) ── rule-nodes
├───2.12 MB (17.16%) ── style-sheets
├───1.65 MB (13.33%) -- dom
│   ├──0.92 MB (07.42%) ── element-nodes
│   ├──0.51 MB (04.09%) ── text-nodes
│   ├──0.19 MB (01.51%) ── other
│   └──0.04 MB (00.32%) ++ (3 tiny)
└───0.01 MB (00.11%) ── property-tables

  0.44 MB ── canvas-2d-pixel-bytes
326.87 MB ── explicit
  0.31 MB ── gfx-d2d-surfacecache
  4.56 MB ── gfx-d2d-surfacevram
 10.12 MB ── gfx-d2d-vram-drawtarget
  0.91 MB ── gfx-d2d-vram-sourcesurface
  1.00 MB ── gfx-surface-image
        0 ── ghost-windows
228.24 MB ── heap-allocated
259.80 MB ── heap-committed
 31.53 MB ── heap-committed-unused
   13.81% ── heap-committed-unused-ratio
  2.26 MB ── heap-dirty
 57.73 MB ── heap-unused
  0.84 MB ── images-content-used-uncompressed
 96.00 MB ── js-gc-heap
        0 ── low-commit-space-events
490.32 MB ── private
480.46 MB ── resident
  8.23 MB ── storage-sqlite
848.19 MB ── vsize



Most of the time I get:

Main Process

Explicit Allocations
439.08 MB (100.0%) -- explicit
├──191.99 MB (43.73%) -- window-objects
│  ├──152.08 MB (34.64%) -- top(http://dromaeo.com/?dom-mod&numTests=1, id=19)/active
│  │  ├──146.18 MB (33.29%) -- window(http://dromaeo.com/tests/dom-modify.html)
│  │  │  ├──107.45 MB (24.47%) -- dom
│  │  │  │  ├──106.97 MB (24.36%) ── orphan-nodes
│  │  │  │  └────0.48 MB (00.11%) ++ (4 tiny)
│  │  │  ├───38.73 MB (08.82%) -- js
│  │  │  │   ├──38.57 MB (08.78%) -- compartment(http://dromaeo.com/tests/dom-modify.html, about:blank)
│  │  │  │   │  ├──32.40 MB (07.38%) ── string-chars/non-huge
│  │  │  │   │  ├───5.89 MB (01.34%) -- gc-heap
│  │  │  │   │  │   ├──5.42 MB (01.23%) -- objects
│  │  │  │   │  │   │  ├──5.19 MB (01.18%) ── ordinary
│  │  │  │   │  │   │  └──0.23 MB (00.05%) ── function
│  │  │  │   │  │   └──0.47 MB (00.11%) ++ (5 tiny)
│  │  │  │   │  └───0.28 MB (00.06%) ++ (4 tiny)
│  │  │  │   └───0.16 MB (00.04%) ++ compartment(http://dromaeo.com/tests/dom-modify.html, NoScript::ScriptSurrogate@http://dromaeo.com/tests/dom-modify.html (from: chrome://noscript/content/ScriptSurrogate.js:244))
│  │  │  └────0.00 MB (00.00%) ── style-sheets
│  │  └────5.90 MB (01.34%) -- window(http://dromaeo.com/?dom-mod&numTests=1)
│  │       ├──4.50 MB (01.02%) ++ js
│  │       └──1.41 MB (00.32%) ++ (3 tiny)
│  ├────9.32 MB (02.12%) -- top(https://www.google.com.br/search?q=eventualy&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-nightly#hl=pt-BR&client=firefox-nightly&hs=wY7&tbo=d&rls=org.mozilla:en-US:unofficial&spell=1&q=eventually&sa=X&ei=SaHDUMraC-ip0AHNh4CwDQ&ved=0CC0QvwUoAA&bav=on.2,or.r_gc.r_pw.r_qf.&fp=2b9a05c48220cc59&bpcl=39650382&biw=1366&bih=618, id=107)/active
│  │    ├──9.21 MB (02.10%) -- window(https://www.google.com.br/search?q=eventualy&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-nightly#hl=pt-BR&client=firefox-nightly&hs=wY7&tbo=d&rls=org.mozilla:en-US:unofficial&spell=1&q=eventually&sa=X&ei=SaHDUMraC-ip0AHNh4CwDQ&ved=0CC0QvwUoAA&bav=on.2,or.r_gc.r_pw.r_qf.&fp=2b9a05c48220cc59&bpcl=39650382&biw=1366&bih=618)
│  │    │  ├──5.96 MB (01.36%) -- js
│  │    │  │  ├──5.84 MB (01.33%) ++ compartment(https://www.google.com.br/search?q=eventualy&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-nightly)
│  │    │  │  └──0.12 MB (00.03%) ++ compartment(https://www.google.com.br/search?q=eventualy&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-nightly, NoScript::ScriptSurrogate@https://www.google.com.br/search?q=eventualy&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-nightly (from: chrome://noscript/content/ScriptSurrogate.js:244))
│  │    │  └──3.25 MB (00.74%) ++ (4 tiny)
│  │    └──0.11 MB (00.02%) ++ window(about:blank)
│  ├────7.74 MB (01.76%) ++ (5 tiny)
│  ├────6.45 MB (01.47%) -- top(chrome://browser/content/browser.xul, id=3)/active
│  │    ├──6.30 MB (01.44%) -- window(chrome://browser/content/browser.xul)
│  │    │  ├──4.71 MB (01.07%) ++ js/compartment([System Principal], about:blank)
│  │    │  └──1.59 MB (00.36%) ++ (4 tiny)
│  │    └──0.15 MB (00.03%) ++ window(about:blank)
│  ├────5.96 MB (01.36%) ++ top(https://www.facebook.com/, id=17)/active/window(https://www.facebook.com/)
│  ├────5.36 MB (01.22%) ++ top(https://bugzilla.mozilla.org/show_bug.cgi?id=819690, id=91)/active/window(https://bugzilla.mozilla.org/show_bug.cgi?id=819690)
│  └────5.07 MB (01.16%) ++ top(https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1&ltmpl=default&ltmplcache=2&hl=pt-BR, id=13)/active
├──117.51 MB (26.76%) -- js-non-window
│  ├───68.76 MB (15.66%) -- compartments
│  │   ├──61.54 MB (14.02%) -- non-window-global
│  │   │  ├──28.72 MB (06.54%) -- compartment([System Principal], jar:file:///C:/Users/Guilherme/AppData/Roaming/Mozilla/Firefox/Profiles/jpeirp20.Teste/extensions/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D.xpi!/bootstrap.js (from: resource://gre/modules/XPIProvider.jsm:3650))
│  │   │  │  ├──15.38 MB (03.50%) -- gc-heap
│  │   │  │  │  ├──10.14 MB (02.31%) ++ (6 tiny)
│  │   │  │  │  └───5.24 MB (01.19%) ++ objects
│  │   │  │  ├───6.38 MB (01.45%) -- string-chars
│  │   │  │  │   ├──6.36 MB (01.45%) ── non-huge
│  │   │  │  │   └──0.02 MB (00.00%) ++ huge
│  │   │  │  ├───4.42 MB (01.01%) ++ objects-extra
│  │   │  │  └───2.54 MB (00.58%) ++ (7 tiny)
│  │   │  ├──27.08 MB (06.17%) ++ (192 tiny)
│  │   │  └───5.74 MB (01.31%) ++ compartment([System Principal], jar:file:///C:/Users/Guilherme/AppData/Roaming/Mozilla/Firefox/Profiles/jpeirp20.Teste/extensions/%7B73a6fe31-595d-460b-a920-fcc0f8843232%7D.xpi!/components/noscriptService.js)
│  │   └───7.22 MB (01.64%) -- no-global
│  │       ├──7.18 MB (01.63%) -- compartment(atoms)
│  │       │  ├──4.60 MB (01.05%) ++ string-chars
│  │       │  └──2.58 MB (00.59%) ++ (2 tiny)
│  │       └──0.04 MB (00.01%) ++ compartment([System Principal], about:newtab)
│  ├───40.96 MB (09.33%) -- gc-heap
│  │   ├──18.33 MB (04.18%) ── decommitted-arenas
│  │   ├──13.00 MB (02.96%) ── unused-chunks
│  │   ├───8.30 MB (01.89%) ── unused-arenas
│  │   └───1.33 MB (00.30%) ── chunk-admin
│  └────7.79 MB (01.77%) ++ runtime
├───88.69 MB (20.20%) ── heap-unclassified
├───12.68 MB (02.89%) ++ (15 tiny)
├───12.03 MB (02.74%) -- storage
│   ├──10.48 MB (02.39%) -- sqlite
│   │  ├───5.95 MB (01.36%) ++ (10 tiny)
│   │  └───4.53 MB (01.03%) ++ places.sqlite
│   └───1.55 MB (00.35%) ++ prefixset
├───10.18 MB (02.32%) -- cycle-collector
│   ├──10.16 MB (02.31%) ── purple-buffer
│   └───0.02 MB (00.00%) ── collector-object
└────6.01 MB (01.37%) -- layout
     ├──5.80 MB (01.32%) ── style-sheet-service
     └──0.21 MB (00.05%) ── style-sheet-cache

Other Measurements
245 (100.0%) -- js-compartments
├──218 (88.98%) ── system
└───27 (11.02%) ── user

184.33 MB (100.0%) -- js-main-runtime
├──135.58 MB (73.55%) -- compartments
│  ├───57.04 MB (30.95%) -- gc-heap
│  │   ├──20.63 MB (11.19%) -- objects
│  │   │  ├──11.25 MB (06.10%) ── ordinary
│  │   │  ├───6.35 MB (03.44%) ── function
│  │   │  ├───2.70 MB (01.46%) ── dense-array
│  │   │  └───0.34 MB (00.18%) ++ (2 tiny)
│  │   ├──16.47 MB (08.94%) ── unused-gc-things
│  │   ├──10.27 MB (05.57%) -- shapes
│  │   │  ├───3.80 MB (02.06%) ── dict
│  │   │  ├───3.30 MB (01.79%) -- tree
│  │   │  │   ├──2.72 MB (01.48%) ── global-parented
│  │   │  │   └──0.58 MB (00.32%) ── non-global-parented
│  │   │  └───3.17 MB (01.72%) ── base
│  │   ├───6.14 MB (03.33%) -- strings
│  │   │   ├──4.70 MB (02.55%) ── normal
│  │   │   └──1.45 MB (00.78%) ── short
│  │   ├───2.53 MB (01.37%) ── scripts
│  │   └───0.99 MB (00.54%) ++ (3 tiny)
│  ├───45.57 MB (24.72%) -- string-chars
│  │   ├──43.67 MB (23.69%) ── non-huge
│  │   └───1.90 MB (01.03%) ++ huge
│  ├────8.50 MB (04.61%) -- type-inference
│  │    ├──6.66 MB (03.61%) ── analysis-pool
│  │    └──1.85 MB (01.00%) ++ (6 tiny)
│  ├────7.83 MB (04.25%) -- shapes-extra
│  │    ├──5.43 MB (02.95%) ── compartment-tables
│  │    └──2.40 MB (01.30%) ++ (3 tiny)
│  ├────7.48 MB (04.06%) ── script-data
│  ├────7.46 MB (04.05%) -- objects-extra
│  │    ├──6.03 MB (03.27%) ── slots
│  │    └──1.43 MB (00.78%) ++ (4 tiny)
│  └────1.69 MB (00.92%) ++ (6 tiny)
├───40.96 MB (22.22%) -- gc-heap
│   ├──18.33 MB (09.95%) ── decommitted-arenas
│   ├──13.00 MB (07.05%) ── unused-chunks
│   ├───8.30 MB (04.50%) ── unused-arenas
│   └───1.33 MB (00.72%) ── chunk-admin
└────7.79 MB (04.23%) ── runtime

79.67 MB (100.0%) -- js-main-runtime-gc-heap-committed
├──41.90 MB (52.59%) -- used
│  ├──40.24 MB (50.51%) ── gc-things
│  ├───1.33 MB (01.67%) ── chunk-admin
│  └───0.33 MB (00.42%) ── arena-admin
└──37.77 MB (47.41%) -- unused
   ├──16.47 MB (20.67%) ── gc-things
   ├──13.00 MB (16.32%) ── chunks
   └───8.30 MB (10.41%) ── arenas

0 (100.0%) -- low-memory-events
├──0 (100.0%) ── physical
└──0 (100.0%) ── virtual

125.19 MB (100.0%) -- window-objects
├──109.87 MB (87.76%) -- dom
│  ├──107.19 MB (85.62%) ── orphan-nodes
│  ├────1.49 MB (01.19%) ── element-nodes
│  └────1.19 MB (00.95%) ++ (4 tiny)
├───12.42 MB (09.92%) -- layout
│   ├───9.91 MB (07.92%) ── style-sets
│   └───2.51 MB (02.01%) ++ (7 tiny)
├────2.88 MB (02.30%) ── style-sheets
└────0.02 MB (00.02%) ── property-tables

  1.33 MB ── canvas-2d-pixel-bytes
439.00 MB ── explicit
  0.32 MB ── gfx-d2d-surfacecache
  5.50 MB ── gfx-d2d-surfacevram
  9.02 MB ── gfx-d2d-vram-drawtarget
  1.21 MB ── gfx-d2d-vram-sourcesurface
  1.31 MB ── gfx-surface-image
        0 ── ghost-windows
337.64 MB ── heap-allocated
348.06 MB ── heap-committed
 10.38 MB ── heap-committed-unused
    3.07% ── heap-committed-unused-ratio
  2.08 MB ── heap-dirty
 13.32 MB ── heap-unused
  0.87 MB ── images-content-used-uncompressed
 98.00 MB ── js-gc-heap
        0 ── low-commit-space-events
615.02 MB ── private
612.66 MB ── resident
 10.48 MB ── storage-sqlite
957.66 MB ── vsize
I'll try to catch it in DMD.
Assignee: nobody → n.nethercote
Blocks: DarkMatter
Flags: needinfo?(n.nethercote)
Whiteboard: [MemShrink]
Whiteboard: [MemShrink] → [MemShrink:P2]
Attached file DMD output
Here are the top 20 records in the DMD output.  nsNodeUtils::CloneAndAdopt and nsTextNode::CloneDataNode features heavily.

bz, can you see what we're missing reporter-wise?  Thanks.
Flags: needinfo?(n.nethercote) → needinfo?(bzbarsky)
Hmm, I wonder if our failure to count shared strings is a problem here.
Do we have a reporter for nodes that are not in the DOM?

That top report (actually the top three) there is for the actual nsTextNode allocation, not for the text inside it, at first glance.... At least assuming your line 149 is:

149   nsTextNode *it = new nsTextNode(ni.forget());

The fourth report is for the memory in the nsTextFragment itself.  We do report the memory for it if we report the textnode, though.  So this is the same issue.

The fifth report is for an HTMLElement allocation.  Again, this is just a node not in the DOM...

Report 7 is child storage in an element that got cloned.  We report this if we report the element.

Reports 6, 9, 10, 11, 12, 19, 20 are like 1-3.

Reports 8, 13, 14, 15, 16, 17 are like report 5.

Report 18 is like report 7.
Flags: needinfo?(bzbarsky)
There is a reporter for nodes that are held alive directly by JS objects, but are not in a document. jst's super orphan finder was backed out due to perf regressions. My hackier approach has 0 overhead. We figured JS would be the most common problem for leaky webpages.
It's possible in this case that the nodes are not reachable from JS but we haven't done the right GC/CC dance to have collected them yet.  Likely, in fact, if the testcase is doing a bunch of cloning and throwing away the result.
> Do we have a reporter for nodes that are not in the DOM?

We report orphan nodes.  They show up in about:memory under "window(...)/dom/orphan-nodes".

The mechanism is that OrphanReporter::sizeOfIncludingThis() (http://mxr.mozilla.org/mozilla-central/source/js/xpconnect/src/XPCJSRuntime.cpp#1993) is called for 
every JS object for which JSCLASS_PRIVATE_IS_NSISUPPORTS is true (see
http://mxr.mozilla.org/mozilla-central/source/js/src/jsmemorymetrics.cpp#165).

Should that mechanism be catching these cases?


> That top report (actually the top three) there is for the actual nsTextNode
> allocation, not for the text inside it, at first glance.... At least
> assuming your line 149 is:
> 
> 149   nsTextNode *it = new nsTextNode(ni.forget());

It is.  (The profiled revision is mozilla-inbound 116223:a87e3d18444a)
> It's possible in this case that the nodes are not reachable from JS but we
> haven't done the right GC/CC dance to have collected them yet.

Not sure if I understand what you're saying, but the orphan node reporter inspects every JS object, not just the live ones.
In that case, I have no idea what's going on here.  :(  The DMD output clearly shows nodes not being reported....
Does this Dromaeo test involve web workers?  Workers that use ctypes don't get reported at the moment (bug 813867).
I don't think workers create nodes.
No workers in dromaeo, and no nodes in workers.
I wonder if there's some racing going on between the memory reporters and the DOM-modification code?  E.g. the DOM/JS reporter runs and then while other reporters are running the new DOM nodes are added?
Assignee: n.nethercote → nobody
Severity: normal → S3

DOM heap-unclassified has been good enough for awhile. I don't know about this benchmark in particular.

Status: UNCONFIRMED → RESOLVED
Closed: 8 months ago
Component: General → DOM: Core & HTML
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: