Last Comment Bug 747202 - IonMonkey: Investigate memory usage
: IonMonkey: Investigate memory usage
Status: RESOLVED FIXED
[ion:t][MemShrink:P2]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla18
Assigned To: Nicholas Nethercote [:njn]
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks: LandIon
  Show dependency treegraph
 
Reported: 2012-04-19 15:20 PDT by David Anderson [:dvander]
Modified: 2012-09-20 05:22 PDT (History)
11 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Separate and clean up JaegerMonkey's and IonMonkey's memory reporting. (32.14 KB, patch)
2012-09-19 18:23 PDT, Nicholas Nethercote [:njn]
dvander: review+
Details | Diff | Splinter Review

Description David Anderson [:dvander] 2012-04-19 15:20:57 PDT
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.
Comment 1 Nicholas Nethercote [:njn] 2012-08-27 23:18:38 PDT
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.
Comment 2 David Anderson [:dvander] 2012-08-27 23:46:12 PDT
(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.
Comment 3 Nicholas Nethercote [:njn] 2012-09-19 18:23:03 PDT
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.
Comment 4 David Anderson [:dvander] 2012-09-19 18:27:16 PDT
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!
Comment 5 Nicholas Nethercote [:njn] 2012-09-19 19:01:43 PDT
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.
Comment 6 :Ms2ger (⌚ UTC+1/+2) 2012-09-20 04:49:16 PDT
https://hg.mozilla.org/mozilla-central/rev/fc78ad051132

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