Last Comment Bug 832026 - Measure JSRuntime::bumpAlloc_ in the JS memory reporter.
: Measure JSRuntime::bumpAlloc_ in the JS memory reporter.
Status: RESOLVED FIXED
[MemShrink]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla21
Assigned To: Nicholas Nethercote [:njn]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-17 14:33 PST by Nicholas Nethercote [:njn]
Modified: 2013-01-19 10:41 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Measure JSRuntime::bumpAlloc_ in the JS memory reporter. (5.89 KB, patch)
2013-01-17 14:33 PST, Nicholas Nethercote [:njn]
sstangl: review+
Details | Diff | Review

Description Nicholas Nethercote [:njn] 2013-01-17 14:33:37 PST
We don't measure the mmaps done by JSRuntime::bumpAlloc_.
Comment 1 Nicholas Nethercote [:njn] 2013-01-17 14:33:50 PST
Created attachment 703602 [details] [diff] [review]
Measure JSRuntime::bumpAlloc_ in the JS memory reporter.

This patch measures JSRuntime::bumpAlloc_.  I haven't seen it go higher than 4
KiB, but we want to have complete coverage of all the mmap calls done by
Firefox, so it's worth having just for that reason.  Also, it's possible that
it could go higher in rare cases.
Comment 2 Sean Stangl [:sstangl] 2013-01-17 15:15:31 PST
Comment on attachment 703602 [details] [diff] [review]
Measure JSRuntime::bumpAlloc_ in the JS memory reporter.

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

::: js/src/jscntxt.cpp
@@ +155,5 @@
>      }
>  
> +    if (bumpAlloc_) {
> +        n += bumpAlloc_->sizeOfNonHeapData();
> +    }

uber-nit: no need for braces in single-line if()
Comment 3 Nicholas Nethercote [:njn] 2013-01-17 15:42:31 PST
Thanks for the fast review.


> uber-nit: no need for braces in single-line if()

Going back and forth between JS and Gecko styles is such a delight.
Comment 4 Nicholas Nethercote [:njn] 2013-01-17 17:52:01 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/4f0b7a4daacf

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