Last Comment Bug 656520 - Make sure the gc-heap memory reporter is in the right place
: Make sure the gc-heap memory reporter is in the right place
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: unspecified
: All All
: -- normal with 1 vote (vote)
: ---
Assigned To: Nicholas Nethercote [:njn]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-11 19:09 PDT by Nicholas Nethercote [:njn]
Modified: 2011-05-22 21:41 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (839 bytes, patch)
2011-05-11 19:09 PDT, Nicholas Nethercote [:njn]
anygregor: review+
Details | Diff | Splinter Review

Description Nicholas Nethercote [:njn] 2011-05-11 19:09:25 PDT
Created attachment 531833 [details] [diff] [review]
patch

If MOZ_MEMORY is undefined then the GC heap is allocated with mmap instead of malloc.  But the GC heap memory reporter always has the path "heap-used/js/string-data" which means that when MOZ_MEMORY is undefined it'll put it in the wrong place.

This patch fixes this problem.
Comment 1 Nicholas Nethercote [:njn] 2011-05-11 20:13:06 PDT
I can confirm that on Mac, MOZ_MEMORY is undefined (because it doesn't use jemalloc) and so the GC heap space was incorrectly categorized as being on the (malloc) heap.  The patch moves it to the right place:

Mapped Memory
2,920.00 MB (100.0%) -- mapped
├──2,868.40 MB (98.23%) -- other
├─────44.17 MB (01.51%) -- heap
│     ├──29.27 MB (01.00%) -- used
│     └──14.90 MB (00.51%) -- unused
└──────7.44 MB (00.25%) -- js
       ├──7.00 MB (00.24%) -- gc-heap
       ├──0.44 MB (00.01%) -- mjit-code
       └──0.00 MB (00.00%) -- (1 omitted)
Comment 2 Nicholas Nethercote [:njn] 2011-05-22 21:41:34 PDT
http://hg.mozilla.org/mozilla-central/rev/344bddedf5b3

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