Closed Bug 1200795 Opened 10 years ago Closed 10 years ago

CCGraph::mPtrToNodeMap not reported

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

Details

(Whiteboard: [MemShrink:P2])

Attachments

(2 files, 1 obsolete file)

While looking at a DMD report from bug 1156484, I noticed that somehow we don't report mPtrToNodeMap, which can be a pretty large hash table. I have no idea how that happened. Anyways, somebody just needs to add something for this to CCGraph::SizeOfExcludingThis(). In this log I have here, the hash table is 4MB, so it is quite large, but it only lives for the duration of the cycle collection, which isn't going to be more than a second at most.
Whiteboard: [MemShrink] → [MemShrink:P2]
Assignee: nobody → continuation
Comment on attachment 8656793 [details] [diff] [review] Add memory reporting for CCGraph::mPtrToNodeMap. Review of attachment 8656793 [details] [diff] [review]: ----------------------------------------------------------------- ::: xpcom/base/nsCycleCollector.cpp @@ +1318,5 @@ > void SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf, > size_t* aObjectSize, > size_t* aGraphNodesSize, > size_t* aGraphEdgesSize, > size_t* aWeakMapsSize, There are now enough arguments here that it might be worth bundling them up (including MallocSizeOf) into a struct. Bonus points if you do that :)
Attachment #8656793 - Flags: review?(n.nethercote) → review+
I was also thinking about eliminating the subcategories. It seems like overkill.
(In reply to Andrew McCreight [:mccr8] from comment #3) > I was also thinking about eliminating the subcategories. It seems like > overkill. Ok by me; I don't really understand all the different things they're measuring anyway :) And these don't show up often.
Comment on attachment 8656894 [details] [diff] [review] part 2 - Add memory reporting for CCGraph::mPtrToNodeMap. Actually adding the reporting is now trivial. Carrying over njn's review from the old patch.
Attachment #8656894 - Flags: review+
Comment on attachment 8656893 [details] [diff] [review] part 1 - Eliminate excessive detail from cycle collector graph memory reporting. Review of attachment 8656893 [details] [diff] [review]: ----------------------------------------------------------------- Yeah, this is better. ::: xpcom/base/nsCycleCollector.cpp @@ +3330,5 @@ > REPORT("explicit/cycle-collector/collector-object", objectSize, > "Memory used for the cycle collector object itself."); > > + REPORT("explicit/cycle-collector/graph", graphSize, > + "Memory used for the cycle collector's graph. " Nit: extraneous space at end.
Attachment #8656893 - Flags: review?(n.nethercote) → review+
(In reply to Nicholas Nethercote [:njn] from comment #8) > Nit: extraneous space at end. This space is needed as a separator for the next line of the description, so I left it in.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: