As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
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
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: unspecified
: All All
: -- normal with 1 vote (vote)
: ---
Assigned To: Nicholas Nethercote [:njn]
: Andrew Overholt [:overholt]
Depends on:
  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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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

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

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 User image 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 User image Nicholas Nethercote [:njn] 2011-05-22 21:41:34 PDT

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