Last Comment Bug 729403 - Add js/runtime/gc-marker memory reporter
: Add js/runtime/gc-marker memory reporter
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
-- normal (vote)
: mozilla13
Assigned To: Nicholas Nethercote [:njn]
: Jason Orendorff [:jorendorff]
Depends on: DMD 728990 733374
Blocks: DarkMatter
  Show dependency treegraph
Reported: 2012-02-21 21:43 PST by Nicholas Nethercote [:njn]
Modified: 2012-03-07 02:03 PST (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

add Vector::sizeOf{In,Ex}cludingThis (1.73 KB, patch)
2012-02-21 21:43 PST, Nicholas Nethercote [:njn]
luke: review+
Details | Diff | Splinter Review
add js/runtime/gc-marker (8.72 KB, patch)
2012-02-21 21:45 PST, Nicholas Nethercote [:njn]
wmccloskey: review+
Details | Diff | Splinter Review

Description User image Nicholas Nethercote [:njn] 2012-02-21 21:43:19 PST
Created attachment 599478 [details] [diff] [review]
add Vector::sizeOf{In,Ex}cludingThis

The GCMarker starts off taking 256KB and if I run it gets up to 2.8MB.

This first patch just adds SizeOf{In,Ex}cludingThis to Vector.
Comment 1 User image Nicholas Nethercote [:njn] 2012-02-21 21:45:32 PST
Created attachment 599479 [details] [diff] [review]
add js/runtime/gc-marker

Pretty simple.  Bill, does the MarkStack ever shrink?  If not, it's the kind of thing that hurts us w.r.t. bug 668809.
Comment 2 User image Nicholas Nethercote [:njn] 2012-02-23 17:08:59 PST
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 3 User image Bill McCloskey (:billm) 2012-02-24 15:02:31 PST
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.
Comment 5 User image Phil Ringnalda (:philor) 2012-02-26 18:42:21 PST
Backed out both (because I wasn't likely to figure out which) in - both Mac debug builds agreed that they should assert about "The two measurements of 'explicit' memory usage don't match: 'explicitNonHeapMultiSize == explicitNonHeapMultiSize2'"
Comment 8 User image Nicholas Nethercote [:njn] 2012-03-06 11:48:39 PST
A tiny follow-up to fix a runtime warning:
Comment 9 User image Marco Bonardo [::mak] 2012-03-07 02:03:49 PST

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