Closed
Bug 805915
Opened 12 years ago
Closed 12 years ago
More detail in JS memory reports
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
(Whiteboard: [js:t])
Attachments
(5 files)
3.15 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
5.89 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
1.83 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
7.95 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
4.58 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
I have some patches to add yet more detail to JS memory reports.
Assignee | ||
Comment 1•12 years ago
|
||
This patch renames the "cross-compartment-wrappers" memory report as
"cross-compartment-wrappers-table", which is a better name because it's just
the table, but not the CCW objects themselves.
Attachment #675636 -
Flags: review?(luke)
Assignee | ||
Comment 2•12 years ago
|
||
This patch distinguishes dense array objects, slow array objects, and
cross-compartment wrapper objects from "ordinary" objects.
Attachment #675638 -
Flags: review?(luke)
Updated•12 years ago
|
Attachment #675636 -
Flags: review?(luke) → review+
Assignee | ||
Comment 3•12 years ago
|
||
JSString::isShort() succeeds for strings that are not short but happen to be
in a FINALIZE_SHORT_STRING arena. This patch fixes this misleading behaviour.
Attachment #675641 -
Flags: review?(luke)
Updated•12 years ago
|
Attachment #675638 -
Flags: review?(luke) → review+
Assignee | ||
Comment 4•12 years ago
|
||
This patch distinguishes short strings from normal strings.
Attachment #675645 -
Flags: review?(luke)
Comment 5•12 years ago
|
||
Comment on attachment 675641 [details] [diff] [review]
(part 3) - Fix misleading behaviour of JSString::isShort().
Thanks!
Attachment #675641 -
Flags: review?(luke) → review+
Assignee | ||
Comment 6•12 years ago
|
||
This patch distinguishes tree shapes that don't have the global object as
their parent.
Attachment #675646 -
Flags: review?(luke)
Comment 7•12 years ago
|
||
Comment on attachment 675645 [details] [diff] [review]
(part 4) - Add more detail to string memory reports.
Review of attachment 675645 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/vm/String.h
@@ +415,4 @@
>
> static inline js::ThingRootKind rootKind() { return js::THING_ROOT_STRING; }
>
> + bool isShort() const;
Could you move this declaration next to the other isX() queries (below asInline, before asStable).
::: js/xpconnect/src/XPCJSRuntime.cpp
@@ +1509,5 @@
> + CREPORT_GC_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("gc-heap/strings/short"),
> + cStats.gcHeapStringsShort,
> + "Memory on the garbage-collected JavaScript "
> + "heap that holds short strings, in which the string "
> + "characters are stored in the string header.");
How about:
"Memory on the garbage-collected JavaScript heap that holds double-sized string headers which store the characters inline."
Attachment #675645 -
Flags: review?(luke) → review+
Comment 8•12 years ago
|
||
Hmm, "double-sized" might be confusing (with the C++ type 'double'). How about "over-sized"?
Comment 9•12 years ago
|
||
Comment on attachment 675646 [details] [diff] [review]
(part 5) - Add more detail to shape memory reports.
Review of attachment 675646 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/xpconnect/src/XPCJSRuntime.cpp
@@ +1522,5 @@
> + CREPORT_GC_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("gc-heap/shapes/tree/canonical"),
> + cStats.gcHeapShapesTreeCanonical,
> + "Memory on the garbage-collected JavaScript heap that "
> + "holds shapes that are in a property tree, and whose "
> + "parent is the global object.");
How about "Memory on the garbage-collected JavaScript heap that holds shapes that are in the property tree and represent an object whose parent is the global object" (and the same below, mutatis mutandis)?
Attachment #675646 -
Flags: review?(luke) → review+
Assignee | ||
Comment 10•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/22a934cbde1f
https://hg.mozilla.org/integration/mozilla-inbound/rev/31395c6bb9b8
https://hg.mozilla.org/integration/mozilla-inbound/rev/aa23bf4b9a20
https://hg.mozilla.org/integration/mozilla-inbound/rev/b23881c4de78
https://hg.mozilla.org/integration/mozilla-inbound/rev/7d95543f4750
Comment 11•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/22a934cbde1f
https://hg.mozilla.org/mozilla-central/rev/31395c6bb9b8
https://hg.mozilla.org/mozilla-central/rev/aa23bf4b9a20
https://hg.mozilla.org/mozilla-central/rev/b23881c4de78
https://hg.mozilla.org/mozilla-central/rev/7d95543f4750
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in
before you can comment on or make changes to this bug.
Description
•