Closed Bug 729403 Opened 9 years ago Closed 9 years ago

Add js/runtime/gc-marker memory reporter

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: njn, Assigned: njn)

References

(Blocks 1 open bug)

Details

(Whiteboard: [MemShrink])

Attachments

(2 files)

The GCMarker starts off taking 256KB and if I run gregor-wagner.com/tmp/mem it gets up to 2.8MB.

This first patch just adds SizeOf{In,Ex}cludingThis to Vector.
Attachment #599478 - Flags: review?(luke)
Pretty simple.  Bill, does the MarkStack ever shrink?  If not, it's the kind of thing that hurts us w.r.t. bug 668809.
Attachment #599479 - Flags: review?(wmccloskey)
Attachment #599478 - Flags: review?(luke) → review+
I just worked out the following:  this patch measures only JSRuntime::gcMarker, which is the main marker and has a 256KB stack.  There are other short-lived GCMarker objects as well that start with 0KB stacks.  This patch doesn't measure them.
Comment on attachment 599479 [details] [diff] [review]
add js/runtime/gc-marker

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

This looks fine aside from skipping the per-compartment barrier markers.

In the not-too-distant future, I'd like to eliminate those. They're not necessary now that we have a single-threaded runtime.

Also, I'll try to put something together to reset the mark stack size when the GC is over.
Attachment #599479 - Flags: review?(wmccloskey) → review+
Backed out both (because I wasn't likely to figure out which) in https://hg.mozilla.org/integration/mozilla-inbound/rev/85715b21f80e - both Mac debug builds agreed that they should assert about "The two measurements of 'explicit' memory usage don't match: 'explicitNonHeapMultiSize == explicitNonHeapMultiSize2'"
https://hg.mozilla.org/mozilla-central/rev/89c46aa25a14
https://hg.mozilla.org/mozilla-central/rev/dbe3f8bad3b5
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Depends on: 733374
You need to log in before you can comment on or make changes to this bug.