Closed Bug 1181452 Opened 9 years ago Closed 9 years ago

Add memory reporting infrastructure for Servo to SpiderMonkey

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

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

References

Details

Attachments

(1 file)

I want to hook up SpiderMonkey's memory reporting to Servo. But I want to report much coarser-grained measurements than what Firefox reports, so there will need to be some aggregation. This bug is about exposing a new API that does that aggregation.
I apologize in advance for the fact that this is a difficult patch to review.
It seems unavoidable :(
Attachment #8630883 - Flags: review?(till)
Comment on attachment 8630883 [details] [diff] [review]
Add memory reporting infrastructure for Servo to SpiderMonkey

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

Looks good. I mean, as much as it can with so much macro-ness and all.

I do wonder why it's preferable to have coarse-grained measurements only for Servo, though. Isn't it, if anything, more important to have detailed measurements because Servo uses the JS engine's GC much more than Gecko does? I know that Terrence was concerned about the increased GC pressure caused by allocating DOM objects on the GC heap. It'd be nice to get a handle of how much of an issue that is sooner rather than later.
Attachment #8630883 - Flags: review?(till) → review+
Thank you for the fast review.

> I do wonder why it's preferable to have coarse-grained measurements only for Servo, though.

My guiding principle here relates to the display of the data.

Firefox has about:memory, which has automatic hiding of small sub-trees and support for collapsing/expanding trees manually. This gives lots of flexibility and the ability to support many measurements.

In contrast Servo currently has a very crude display system that just dumps measurements to the console every N seconds. So I'm being conservative with the granularity for now.
(In reply to Nicholas Nethercote [:njn] from comment #3)
> > I do wonder why it's preferable to have coarse-grained measurements only for Servo, though.
> 
> My guiding principle here relates to the display of the data.

Good point, thanks for the explanation.
https://hg.mozilla.org/mozilla-central/rev/d8f5d0f09eec
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Depends on: 1185739
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: