IonMonkey: Investigate memory usage

RESOLVED FIXED in mozilla18

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dvander, Assigned: njn)

Tracking

unspecified
mozilla18
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ion:t][MemShrink:P2])

Attachments

(1 attachment)

IonMonkey is already hooked up to about:memory, its stats contribute to mjit code and data sizes. We just need to browse around (bug WebJsPerf is a good candidate) and see what our memory usage is like compared to a normal JM+TI browser.
Assignee: general → dvander
Status: NEW → ASSIGNED
Whiteboard: [ion:t]
(Assignee)

Comment 1

5 years ago
Can Ion's mjit code/data stats be measured separately from JM's?  I think it would be worth doing if it's not too hard.
(In reply to Nicholas Nethercote [:njn] from comment #1)
> Can Ion's mjit code/data stats be measured separately from JM's?  I think it
> would be worth doing if it's not too hard.

Yup that should be pretty easy.
Whiteboard: [ion:t] → [ion:t][MemShrink]
(Assignee)

Updated

5 years ago
Whiteboard: [ion:t][MemShrink] → [ion:t][MemShrink:P2]
(Assignee)

Comment 3

5 years ago
Created attachment 662764 [details] [diff] [review]
Separate and clean up JaegerMonkey's and IonMonkey's memory reporting.

This patch improves the memory reporting for IonMonkey.

- I've split Ion code and data from Jaeger code and data.  I'm now using the
  following prefixes: "jaeger-", "ion-" and "regexp-".  I renamed a bunch of
  variable and class members accordingly.

- I'm measuring IonCodes separately from scripts.  There are so few IonCodes 
  that I couldn't get them to show up separately in about:memory;  they 
  always end up aggregated into the "sundries" entries.  This isn't a bad 
  thing :)

- I made the memory measurements follow the standard protocols:
  - Use |mallocSizeOf| instead of computing sizes (less error prone and
    includes slop bytes);
  - Rename size() as sizeOfIncludingThis().

- I removed the bufferSize() measurement, which double-counted Ion code (and
  also incorrectly attributed it to "mjit-data").

Preliminary browsing indicates that the amount of memory used by IonMonkey
is small, *much* less than JaegerMonkey.  It seems to disappear pretty
quickly, too.  Good news.
Attachment #662764 - Flags: review?(dvander)
(Assignee)

Updated

5 years ago
Assignee: dvander → n.nethercote
Comment on attachment 662764 [details] [diff] [review]
Separate and clean up JaegerMonkey's and IonMonkey's memory reporting.

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

Thanks for doing this!
Attachment #662764 - Flags: review?(dvander) → review+
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc78ad051132

dvander, I'll let you decide if you want to close the bug based on this patch, or if you want to do some additional investigation first.
https://hg.mozilla.org/mozilla-central/rev/fc78ad051132
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.