Closed
Bug 722595
Opened 13 years ago
Closed 13 years ago
Add memory reporters for misc things hanging off JS objects
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
(Blocks 1 open bug)
Details
(Whiteboard: [MemShrink:P3])
Attachments
(1 file)
(deleted),
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
This patch:
- Measures a few more small JS things. I probably shouldn't have bothered,
judging from Gmail they'll be lucky to reach 0.01% of total explicit, but
it's done now.
- Tree-ifies the "object-slots" and "object-elements" reporters.
- Better separates JSObject::computedSizeOfThisSlotsElements() and
JSObject::sizeOfExcludingThis() -- the latter now always takes a non-NULL
|mallocSizeOf| argument.
- Converts some reinterpret_casts to static_casts in vm/ArgumentsObject.h.
Attachment #592950 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 1•13 years ago
|
||
=> - Measures a few more small JS things. I probably shouldn't have bothered,
> judging from Gmail they'll be lucky to reach 0.01% of total explicit, but
> it's done now.
Oops, I meant 0.1%!
Assignee | ||
Updated•13 years ago
|
Whiteboard: [MemShrink] → [MemShrink:P3]
Comment 2•13 years ago
|
||
Comment on attachment 592950 [details] [diff] [review]
patch
Review of attachment 592950 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jsobjinlines.h
@@ +1233,5 @@
> + *miscSize += toFunction()->sizeOfMisc(mallocSizeOf);
> + } else if (isArguments()) {
> + *miscSize += asArguments().sizeOfMisc(mallocSizeOf);
> + } else if (isRegExpStatics()) {
> + *miscSize += mallocSizeOf(getPrivate());
Can you put this in a SizeOfRegExpStaticsData or something which is near the existing private accessors on RegExpStatics objects?
::: js/src/vm/GlobalObject.cpp
@@ +512,5 @@
> return true;
> }
>
> +size_t
> +GlobalObject::sizeOfMisc(JSMallocSizeOfFun mallocSizeOf) const
This doesn't seem to get called under sizeOfExcludingThis?
Attachment #592950 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 3•13 years ago
|
||
> > +size_t
> > +GlobalObject::sizeOfMisc(JSMallocSizeOfFun mallocSizeOf) const
>
> This doesn't seem to get called under sizeOfExcludingThis?
Good catch! The RegExpStatics hangs off the GlobalObject so I thought I needed this but then I realized that normal heap enumeration will hit the RegExpStatics object anyway. But I forgot to remove it. Thanks.
Assignee | ||
Comment 4•13 years ago
|
||
Comment 5•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in
before you can comment on or make changes to this bug.
Description
•