Closed
Bug 1226176
Opened 9 years ago
Closed 9 years ago
Compute retained sizes in dominator trees and expose them to JavaScript
Categories
(DevTools :: Memory, defect)
DevTools
Memory
Tracking
(firefox45 fixed)
RESOLVED
FIXED
Firefox 45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: fitzgen, Assigned: fitzgen)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
20.80 KB,
patch
|
bzbarsky
:
review+
sfink
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
r?bz for webidl and cycle collection changes. I realized that DominatorTrees need to hold a reference to their owning heap snapshots, so I had to change the cycle collection macros back to the verbose way. r?sfink for the rest.
Attachment #8689515 -
Flags: review?(sphink)
Attachment #8689515 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 2•9 years ago
|
||
(Forgot to `git add` new test file...)
Attachment #8689516 -
Flags: review?(sphink)
Attachment #8689516 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•9 years ago
|
Attachment #8689515 -
Attachment is obsolete: true
Attachment #8689515 -
Flags: review?(sphink)
Attachment #8689515 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 3•9 years ago
|
||
Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=0446b3079c14
Assignee | ||
Updated•9 years ago
|
Blocks: memory-platform
Depends on: 1226024
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Comment 4•9 years ago
|
||
Comment on attachment 8689516 [details] [diff] [review] Compute retained sizes in dominator trees and expose them to JavaScript > so I had to change the cycle collection macros back to the verbose way. Why? You're not tracing anything new, so this: NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DominatorTree, mParent, mHeapSnapshot) should work fine. You only need the verbose thing if you need to trace things other than your wrappercache. >+++ b/dom/webidl/DominatorTree.webidl Might be worth documenting when this method can throw. r=me on the DOM bits.
Attachment #8689516 -
Flags: review?(bzbarsky) → review+
Comment 5•9 years ago
|
||
Comment on attachment 8689516 [details] [diff] [review] Compute retained sizes in dominator trees and expose them to JavaScript Review of attachment 8689516 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/public/UbiNodeDominatorTree.h @@ +407,5 @@ > + MOZ_ASSERT(retainedSizes.isNothing()); > + auto length = postOrder.length(); > + > + retainedSizes.emplace(); > + if (!retainedSizes->growBy(length)) { Is this guaranteed to zero out the vector?
Attachment #8689516 -
Flags: review?(sphink) → review+
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Steve Fink [:sfink, :s:] from comment #5) > Comment on attachment 8689516 [details] [diff] [review] > Compute retained sizes in dominator trees and expose them to JavaScript > > Review of attachment 8689516 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: js/public/UbiNodeDominatorTree.h > @@ +407,5 @@ > > + MOZ_ASSERT(retainedSizes.isNothing()); > > + auto length = postOrder.length(); > > + > > + retainedSizes.emplace(); > > + if (!retainedSizes->growBy(length)) { > > Is this guaranteed to zero out the vector? No, but zeroing isn't necessary since the value at each index is never read before it is initialized. This is the invariant described in this commment: // Iterate in forward order so that we know all of a node's children in // the dominator tree have already had their retained size // computed. and ensured by this assertion: MOZ_ASSERT(idxOfDominated < i); size += retainedSizes.ref()[idxOfDominated];
Comment 8•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6ae1b5c32e52
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•