Closed Bug 805915 Opened 12 years ago Closed 12 years ago

More detail in JS memory reports

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

(Whiteboard: [js:t])

Attachments

(5 files)

I have some patches to add yet more detail to JS memory reports.
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)
This patch distinguishes dense array objects, slow array objects, and cross-compartment wrapper objects from "ordinary" objects.
Attachment #675638 - Flags: review?(luke)
Attachment #675636 - Flags: review?(luke) → review+
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)
Attachment #675638 - Flags: review?(luke) → review+
This patch distinguishes short strings from normal strings.
Attachment #675645 - Flags: review?(luke)
Comment on attachment 675641 [details] [diff] [review] (part 3) - Fix misleading behaviour of JSString::isShort(). Thanks!
Attachment #675641 - Flags: review?(luke) → review+
This patch distinguishes tree shapes that don't have the global object as their parent.
Attachment #675646 - Flags: review?(luke)
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+
Hmm, "double-sized" might be confusing (with the C++ type 'double'). How about "over-sized"?
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+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: