Closed Bug 1244841 Opened 8 years ago Closed 8 years ago

Memory consumed by SharedArrayBuffer-based asm.js pages is overreported in about:memory.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: jujjyl, Assigned: n.nethercote)

References

(Blocks 1 open bug)

Details

(Whiteboard: [MemShrink:P2])

Attachments

(1 file)

STR:

1. Visit https://dl.dropboxusercontent.com/u/40949268/emcc/bugs/PhysicsStressTest_16threads/12_PhysicsStressTest.html
2. Open about:memory and take a snapshot

Observed: The log reads

6,164.81 MB (100.0%) -- explicit
├──5,393.87 MB (87.49%) -- workers/workers(/C:/code/Urho3D/build_emcc_sse2_relwithdebinfo/bin/12_PhysicsStressTest.html)
│  ├────339.34 MB (05.50%) -- worker(pthread-main.js, 0x1de87b16000)
│  │    ├──272.99 MB (04.43%) -- zone(0x1ded5b29800)
│  │    │  ├──272.30 MB (04.42%) -- compartment(web-worker)
│  │    │  │  ├──271.33 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.33 MB (00.25%) ++ (8 tiny)
│  │    │  │  └────0.97 MB (00.02%) ++ (6 tiny)
│  │    │  └────0.69 MB (00.01%) ++ (9 tiny)
│  │    ├───66.17 MB (01.07%) ++ runtime
│  │    └────0.18 MB (00.00%) ++ (2 tiny)
│  ├────339.34 MB (05.50%) -- worker(pthread-main.js, 0x1de87b17000)
│  │    ├──272.99 MB (04.43%) -- zone(0x1ded5b20800)
│  │    │  ├──272.30 MB (04.42%) -- compartment(web-worker)
│  │    │  │  ├──271.33 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.33 MB (00.25%) ++ (8 tiny)
│  │    │  │  └────0.97 MB (00.02%) ++ (6 tiny)
│  │    │  └────0.69 MB (00.01%) ++ (9 tiny)
│  │    ├───66.17 MB (01.07%) ++ runtime
│  │    └────0.18 MB (00.00%) ++ (2 tiny)
│  ├────339.34 MB (05.50%) -- worker(pthread-main.js, 0x1de87b16800)
│  │    ├──272.99 MB (04.43%) -- zone(0x1ded0f4e800)
│  │    │  ├──272.30 MB (04.42%) -- compartment(web-worker)
│  │    │  │  ├──271.33 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.33 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.97 MB (00.02%) ++ (6 tiny)
│  │    │  └────0.69 MB (00.01%) ++ (9 tiny)
│  │    ├───66.17 MB (01.07%) ++ runtime
│  │    └────0.18 MB (00.00%) ++ (2 tiny)
│  ├────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de84b31800)
│  │    ├──271.57 MB (04.41%) -- zone(0x1ded0d6b800)
│  │    │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│  │    │  │  ├──271.25 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│  │    │  └────0.24 MB (00.00%) ++ (7 tiny)
│  │    ├───64.81 MB (01.05%) ++ runtime
│  │    └────0.23 MB (00.00%) ++ (2 tiny)
│  ├────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de87b0c800)
│  │    ├──271.57 MB (04.41%) -- zone(0x1ded5b28000)
│  │    │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│  │    │  │  ├──271.25 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│  │    │  └────0.24 MB (00.00%) ++ (7 tiny)
│  │    ├───64.81 MB (01.05%) ++ runtime
│  │    └────0.23 MB (00.00%) ++ (2 tiny)
│  ├────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de87b0d800)
│  │    ├──271.57 MB (04.41%) -- zone(0x1ded0f43000)
│  │    │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│  │    │  │  ├──271.25 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│  │    │  └────0.24 MB (00.00%) ++ (7 tiny)
│  │    ├───64.81 MB (01.05%) ++ runtime
│  │    └────0.23 MB (00.00%) ++ (2 tiny)
│  ├────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de87b0e000)
│  │    ├──271.57 MB (04.41%) -- zone(0x1ded0d72800)
│  │    │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│  │    │  │  ├──271.25 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│  │    │  └────0.24 MB (00.00%) ++ (7 tiny)
│  │    ├───64.81 MB (01.05%) ++ runtime
│  │    └────0.23 MB (00.00%) ++ (2 tiny)
│  ├────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de87b0e800)
│  │    ├──271.57 MB (04.41%) -- zone(0x1ded0d6f800)
│  │    │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│  │    │  │  ├──271.25 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│  │    │  └────0.24 MB (00.00%) ++ (7 tiny)
│  │    ├───64.81 MB (01.05%) ++ runtime
│  │    └────0.23 MB (00.00%) ++ (2 tiny)
│  ├────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de87b0f000)
│  │    ├──271.57 MB (04.41%) -- zone(0x1ded5b1e800)
│  │    │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│  │    │  │  ├──271.25 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│  │    │  └────0.24 MB (00.00%) ++ (7 tiny)
│  │    ├───64.81 MB (01.05%) ++ runtime
│  │    └────0.23 MB (00.00%) ++ (2 tiny)
│  ├────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de87b10800)
│  │    ├──271.57 MB (04.41%) -- zone(0x1ded0d7b800)
│  │    │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│  │    │  │  ├──271.25 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│  │    │  └────0.24 MB (00.00%) ++ (7 tiny)
│  │    ├───64.81 MB (01.05%) ++ runtime
│  │    └────0.23 MB (00.00%) ++ (2 tiny)
│  ├────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de87b11800)
│  │    ├──271.57 MB (04.41%) -- zone(0x1ded0f5b000)
│  │    │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│  │    │  │  ├──271.25 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│  │    │  └────0.24 MB (00.00%) ++ (7 tiny)
│  │    ├───64.81 MB (01.05%) ++ runtime
│  │    └────0.23 MB (00.00%) ++ (2 tiny)
│  ├────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de87b13000)
│  │    ├──271.57 MB (04.41%) -- zone(0x1ded0d6c800)
│  │    │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│  │    │  │  ├──271.25 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│  │    │  └────0.24 MB (00.00%) ++ (7 tiny)
│  │    ├───64.81 MB (01.05%) ++ runtime
│  │    └────0.23 MB (00.00%) ++ (2 tiny)
│  ├────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de87b13800)
│  │    ├──271.57 MB (04.41%) -- zone(0x1de87b0a800)
│  │    │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│  │    │  │  ├──271.25 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│  │    │  └────0.24 MB (00.00%) ++ (7 tiny)
│  │    ├───64.81 MB (01.05%) ++ runtime
│  │    └────0.23 MB (00.00%) ++ (2 tiny)
│  ├────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de87b14000)
│  │    ├──271.57 MB (04.41%) -- zone(0x1ded5b2b800)
│  │    │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│  │    │  │  ├──271.25 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│  │    │  └────0.24 MB (00.00%) ++ (7 tiny)
│  │    ├───64.81 MB (01.05%) ++ runtime
│  │    └────0.23 MB (00.00%) ++ (2 tiny)
│  ├────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de87b15000)
│  │    ├──271.57 MB (04.41%) -- zone(0x1ded5b26800)
│  │    │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│  │    │  │  ├──271.25 MB (04.40%) -- classes
│  │    │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│  │    │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│  │    │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│  │    │  └────0.24 MB (00.00%) ++ (7 tiny)
│  │    ├───64.81 MB (01.05%) ++ runtime
│  │    └────0.23 MB (00.00%) ++ (2 tiny)
│  └────336.60 MB (05.46%) -- worker(pthread-main.js, 0x1de87b15800)
│       ├──271.57 MB (04.41%) -- zone(0x1de80e27800)
│       │  ├──271.33 MB (04.40%) -- compartment(web-worker)
│       │  │  ├──271.25 MB (04.40%) -- classes
│       │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│       │  │  │  └───15.25 MB (00.25%) ++ (7 tiny)
│       │  │  └────0.08 MB (00.00%) ++ (4 tiny)
│       │  └────0.24 MB (00.00%) ++ (7 tiny)
│       ├───64.81 MB (01.05%) ++ runtime
│       └────0.23 MB (00.00%) ++ (2 tiny)
├────551.99 MB (08.95%) -- window-objects
│    ├──279.66 MB (04.54%) -- top(file:///C:/code/Urho3D/build_emcc_sse2_relwithdebinfo/bin/12_PhysicsStressTest.html, id=4294967301)
│    │  ├──274.01 MB (04.44%) -- active/window(file:///C:/code/Urho3D/build_emcc_sse2_relwithdebinfo/bin/12_PhysicsStressTest.html)
│    │  │  ├──273.25 MB (04.43%) -- js-compartment(file:///C:/code/Urho3D/build_emcc_sse2_relwithdebinfo/bin/12_PhysicsStressTest.html)
│    │  │  │  ├──272.20 MB (04.42%) -- classes
│    │  │  │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│    │  │  │  │  └───16.20 MB (00.26%) ++ (13 tiny)
│    │  │  │  └────1.05 MB (00.02%) ++ (7 tiny)
│    │  │  └────0.76 MB (00.01%) ++ (4 tiny)
│    │  └────5.65 MB (00.09%) ++ (2 tiny)
│    └──272.34 MB (04.42%) -- top(none)/detached/window([system])
│       ├──272.33 MB (04.42%) -- js-compartment(file:///C:/code/Urho3D/build_emcc_sse2_relwithdebinfo/bin/12_PhysicsStressTest.html)
│       │  ├──272.05 MB (04.41%) -- classes
│       │  │  ├──256.00 MB (04.15%) ++ class(SharedArrayBuffer)
│       │  │  └───16.05 MB (00.26%) ++ (12 tiny)
│       │  └────0.29 MB (00.00%) ++ (5 tiny)
│       └────0.00 MB (00.00%) ++ dom
├────157.95 MB (02.56%) -- js-non-window
│    ├──137.74 MB (02.23%) -- runtime
│    │  ├──128.48 MB (02.08%) -- script-sources
│    │  │  ├──126.94 MB (02.06%) ++ source(scripts=2, file:///C:/code/Urho3D/build_emcc_sse2_relwithdebinfo/bin/12_PhysicsStressTest.js)
│    │  │  └────1.54 MB (00.03%) ++ (26 tiny)
│    │  └────9.26 MB (00.15%) ++ (12 tiny)
│    └───20.21 MB (00.33%) ++ (2 tiny)
└─────61.00 MB (00.99%) ++ (19 tiny)

The web workers do not each allocate their own SharedArrayBuffer (the 256MB block reported by each window), but it is shared between all windows. Therefore the page is overreporting its used memory by 16*256MB=4GB.

Expected: The SharedArrayBuffer would probably be best reported only by the main thread/main worker that originally created it, and all the remaining workers which received it as shared can either omit it, or show 0.00MB in the used size.
Just so you know, DMD should list double reporting like this.
Whiteboard: [MemShrink]
Assignee: nobody → n.nethercote
Whiteboard: [MemShrink] → [MemShrink:P2]
I went with the divide-by-refcount approach because it's easy and reasonable. I
confirmed it works on the abovementioned demo:

> ├──192.45 MB (44.08%) -- workers(dropboxusercontent.com)
> │  ├───98.85 MB (22.64%) -- worker(pthread-main.js, 0x7f39b74ee800)
> │  │   ├──66.97 MB (15.34%) ++ runtime
> │  │   ├──31.69 MB (07.26%) -- zone(0x7f39e688c800)
> │  │   │  ├──31.06 MB (07.11%) -- compartment(web-worker)
> │  │   │  │  ├──30.19 MB (06.92%) -- classes
> │  │   │  │  │  ├──15.06 MB (03.45%) -- class(SharedArrayBuffer)
> │  │   │  │  │  │  ├──15.06 MB (03.45%) -- objects
> │  │   │  │  │  │  │  ├──15.06 MB (03.45%) ── non-heap/elements/shared
> │  │   │  │  │  │  │  └───0.00 MB (00.00%) ── gc-heap
> │  │   │  │  │  │  └───0.00 MB (00.00%) ++ shapes/gc-heap
> │  │   │  │  │  ├──14.46 MB (03.31%) ++ class(WasmModuleObject)
> │  │   │  │  │  └───0.67 MB (00.15%) ++ (7 tiny)
> │  │   │  │  └───0.87 MB (00.20%) ++ (6 tiny)
> │  │   │  └───0.63 MB (00.14%) ++ (8 tiny)
> │  │   └───0.18 MB (00.04%) ++ (2 tiny)
> │  ├───16.57 MB (03.80%) -- worker(pthread-main.js, 0x7f39b74ea000)
> │  │   ├──15.26 MB (03.50%) -- zone(0x7f39b74e9800)
> │  │   │  ├──15.19 MB (03.48%) -- compartment(web-worker)
> │  │   │  │  ├──15.16 MB (03.47%) -- classes
> │  │   │  │  │  ├──15.06 MB (03.45%) -- class(SharedArrayBuffer)
> │  │   │  │  │  │  ├──15.06 MB (03.45%) -- objects
> │  │   │  │  │  │  │  ├──15.06 MB (03.45%) ── non-heap/elements/shared
> │  │   │  │  │  │  │  └───0.00 MB (00.00%) ── gc-heap
> │  │   │  │  │  │  └───0.00 MB (00.00%) ++ shapes/gc-heap
> │  │   │  │  │  └───0.10 MB (00.02%) ++ (2 tiny)
> │  │   │  │  └───0.03 MB (00.01%) ++ (2 tiny)
> │  │   │  └───0.07 MB (00.02%) ++ (5 tiny)
> │  │   └───1.31 MB (00.30%) ++ (3 tiny)
> │  ├───16.57 MB (03.80%) -- worker(pthread-main.js, 0x7f39b74eb800)
> │  │   ├──15.26 MB (03.50%) -- zone(0x7f39ed663000)
> │  │   │  ├──15.19 MB (03.48%) -- compartment(web-worker)
> │  │   │  │  ├──15.16 MB (03.47%) -- classes
> │  │   │  │  │  ├──15.06 MB (03.45%) -- class(SharedArrayBuffer)
> │  │   │  │  │  │  ├──15.06 MB (03.45%) -- objects
> │  │   │  │  │  │  │  ├──15.06 MB (03.45%) ── non-heap/elements/shared
> │  │   │  │  │  │  │  └───0.00 MB (00.00%) ── gc-heap
> │  │   │  │  │  │  └───0.00 MB (00.00%) ++ shapes/gc-heap
> │  │   │  │  │  └───0.10 MB (00.02%) ++ (2 tiny)
> │  │   │  │  └───0.03 MB (00.01%) ++ (2 tiny)
> │  │   │  └───0.07 MB (00.02%) ++ (5 tiny)
> │  │   └───1.31 MB (00.30%) ++ (3 tiny)

15.06 MiB is 1/17th of 256 MiB.
Attachment #8718215 - Flags: review?(lhansen)
(In reply to Andrew McCreight [:mccr8] from comment #1)
> Just so you know, DMD should list double reporting like this.

Except this memory is allocated with mmap(), not malloc(), so it's outside DMD's purview.
Comment on attachment 8718215 [details] [diff] [review]
Don't measure SharedArrayBuffer objects multiple times

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

::: js/src/vm/SharedArrayObject.cpp
@@ +334,5 @@
> +    // owned by this thread. It's conceivable that the refcount might change in
> +    // the middle of memory reporting, in which case the amount reported for
> +    // some threads might be to high (if the refcount goes up) or too low (if
> +    // the refcount goes down). But that's unlikely and hard to avoid, so we
> +    // just live with the risk.

Maybe note that division by zero can't happen since the calling thread keeps the refcount >= 1?
Attachment #8718215 - Flags: review?(lhansen) → review+
Hmm, the divide by refcount approach makes it difficult to use about:memory to examine what the total size of the Emscripten HEAP is, since it can show an odd value like 15.06MB here. I wonder if there might be a more visually clear way to report this?
(In reply to Jukka Jylänki from comment #5)
> Hmm, the divide by refcount approach makes it difficult to use about:memory
> to examine what the total size of the Emscripten HEAP is, since it can show
> an odd value like 15.06MB here. I wonder if there might be a more visually
> clear way to report this?

The current tree structure makes this hard, because workers are in an entirely different top-level sub-tree to JS from window objects. I'll consider that as a follow-up but for now I think this is worth landing to avoid the obviously incorrect measurements.
I just ran the test case again and this time got this:

> │  ├──1,538.89 MB (81.23%) -- workers(dropboxusercontent.com)
> │  │  ├─────99.04 MB (05.23%) -- worker(pthread-main.js, 0x7f61ab5d6000)
> │  │  │     ├──67.04 MB (03.54%) -- runtime
> │  │  │     │  ├──63.47 MB (03.35%) -- script-sources
> │  │  │     │  │  ├──63.47 MB (03.35%) -- source(scripts=1, https://dl.dropboxusercontent.com/u/40949268/emcc/bugs/PhysicsStressTest_16threads/12_PhysicsStressTest.js)
> │  │  │     │  │  │  ├──63.47 MB (03.35%) ── uncompressed
> │  │  │     │  │  │  └───0.00 MB (00.00%) ── misc
> │  │  │     │  │  └───0.00 MB (00.00%) ++ source(scripts=3, <non-notable files>)
> │  │  │     │  └───3.57 MB (00.19%) ++ (11 tiny)
> │  │  │     ├──31.82 MB (01.68%) -- zone(0x7f619eb5b000)
> │  │  │     │  ├──31.14 MB (01.64%) -- compartment(web-worker)
> │  │  │     │  │  ├──30.20 MB (01.59%) ++ classes
> │  │  │     │  │  └───0.94 MB (00.05%) ++ (7 tiny)
> │  │  │     │  └───0.68 MB (00.04%) ++ (9 tiny)
> │  │  │     └───0.18 MB (00.01%) ++ (2 tiny)
> │  │  ├─────99.04 MB (05.23%) -- worker(pthread-main.js, 0x7f61ab5d7800)
> │  │  │     ├──67.04 MB (03.54%) -- runtime
> │  │  │     │  ├──63.47 MB (03.35%) -- script-sources
> │  │  │     │  │  ├──63.47 MB (03.35%) -- source(scripts=1, https://dl.dropboxusercontent.com/u/40949268/emcc/bugs/PhysicsStressTest_16threads/12_PhysicsStressTest.js)
> │  │  │     │  │  │  ├──63.47 MB (03.35%) ── uncompressed
> │  │  │     │  │  │  └───0.00 MB (00.00%) ── misc
> │  │  │     │  │  └───0.00 MB (00.00%) ++ source(scripts=3, <non-notable files>)
> │  │  │     │  └───3.57 MB (00.19%) ++ (11 tiny)
> │  │  │     ├──31.82 MB (01.68%) -- zone(0x7f6191d78800)
> │  │  │     │  ├──31.14 MB (01.64%) -- compartment(web-worker)
> │  │  │     │  │  ├──30.20 MB (01.59%) ++ classes
> │  │  │     │  │  └───0.94 MB (00.05%) ++ (7 tiny)
> │  │  │     │  └───0.68 MB (00.04%) ++ (9 tiny)
> │  │  │     └───0.18 MB (00.01%) ++ (2 tiny)

Note that every worker has 63.47 MB of script-sources. At first I thought that
maybe they're actually shared and so they're being overcounted, but there's
also this:

> 1,411.97 MB ── heap-allocated
>  1,766.32 MB ── resident

which suggests that it's accurate, i.e. every worker runtime really is does have
its own copy of the code. If that's the case, it's an obvious problem and worth
fixing as a follow-up.

I don't know why I didn't see this in the output I got yesterday (comment 2).
> Note that every worker has 63.47 MB of script-sources.

fitzgen told me that this memory is *not* shared and bug 1211723 is open for it.
https://hg.mozilla.org/mozilla-central/rev/9b7c58c2ea3e
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: