Closed Bug 1180123 Opened 10 years ago Closed 10 years ago

Fix minor problems with the JS memory reporter

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(2 files)

I noticed a couple of minor problems with the JS memory reporter.
Bug 972045 added measurement of the saved stacks set, but failed to actually report those measurements so that they show up in about:memory. This patch remedies that. Better suggestions for the description sentence are welcome. BTW, I get 322,048 bytes for this measurement (all compartments combined) in the main runtime just after start-up with just one tab open. That seems kind of high; I expected this would be a devtools only kind of thing. Is this expected?
Attachment #8629249 - Flags: review?(nfitzgerald)
Attachment #8629254 - Flags: review?(terrence)
Comment on attachment 8629254 [details] [diff] [review] (part 2) - Minor nursery report fixes Review of attachment 8629254 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #8629254 - Flags: review?(terrence) → review+
Comment on attachment 8629249 [details] [diff] [review] (part 1) - Report the size of the saved stacks sets Review of attachment 8629249 [details] [diff] [review]: ----------------------------------------------------------------- (In reply to Nicholas Nethercote [:njn] from comment #1) > Created attachment 8629249 [details] [diff] [review] > (part 1) - Report the size of the saved stacks sets > > Bug 972045 added measurement of the saved stacks set, but failed to actually > report those measurements so that they show up in about:memory. Thanks! > BTW, I get 322,048 bytes for this measurement (all compartments combined) in > the main runtime just after start-up with just one tab open. That seems kind > of > high; I expected this would be a devtools only kind of thing. Is this > expected? The SavedStacks machinery is used in almost every case where we want to capture a JS stack these days. That includes DOMExceptions and JS Error objects which are not devtools related. Overall, this should be a net win for reducing memory consumption (even though stacks' memory consumption is more "visible" than before when they were naive JS strings) because SavedStacks does tail sharing of older frames. See bug 1125259 for one example. What tab do you have open? That number sounds a bit high if it was about:blank, but if it is cnn.com, maybe not so much.
Attachment #8629249 - Flags: review?(nfitzgerald) → review+
> The SavedStacks machinery is used in almost every case where we want to > capture a JS stack these days. That includes DOMExceptions and JS Error > objects which are not devtools related. Overall, this should be a net win > for reducing memory consumption (even though stacks' memory consumption is > more "visible" than before when they were naive JS strings) because > SavedStacks does tail sharing of older frames. See bug 1125259 for one > example. Makes sense. Thank you for the explanation. > What tab do you have open? That number sounds a bit high if it was > about:blank, but if it is cnn.com, maybe not so much. Good guess! :) I had cnn.com open, plus about:memory to do the actual measurement.
Ha! cnn.com is a great test site :)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: