Closed
Bug 1201542
Opened 9 years ago
Closed 9 years ago
Implement `allocationSite` breakdown for CensusTreeNode
Categories
(DevTools :: Memory, defect)
Tracking
(firefox44 fixed)
RESOLVED
FIXED
Firefox 44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: jsantell, Assigned: fitzgen)
References
Details
Attachments
(1 file, 1 obsolete file)
45.01 KB,
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Reporter | ||
Updated•9 years ago
|
Assignee: nobody → jsantell
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8675976 -
Flags: review?(jsantell)
Assignee | ||
Comment 3•9 years ago
|
||
Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=dda832df3346
Reporter | ||
Comment 4•9 years ago
|
||
Comment on attachment 8675976 [details] [diff] [review] Implement `allocationSite` breakdown for CensusTreeNode Review of attachment 8675976 [details] [diff] [review]: ----------------------------------------------------------------- some comments but lgtm! ::: devtools/shared/heapsnapshot/census-tree-node.js @@ +61,5 @@ > + * @returns {String} > + * The unique string that can be used as a key in a FrameCache. > + */ > +FrameCache.hash = function (frame) { > + return `${frame.functionDisplayName},${frame.source},${frame.line},${frame.column},${frame.asyncCause}`; Do we always have a column? What about when functions don't have names? Not sure if SavedFrames handles this better than the profiler (I think it does, and tbf it's not hard to handle this better than profiler); A line like: `p.then(function(){},function(){})` where two anon functions are used ::: devtools/shared/heapsnapshot/tests/unit/head_heapsnapshot.js @@ +155,5 @@ > +} > + > +function savedFrameReplacer(key, val) { > + if (isSavedFrame(val)) { > + return "<SavedFrame '" + val.toString().split(/\n/g).shift() + "'>"; template strings might be nicer @@ +188,5 @@ > } > > // Deep structural equivalence that can handle Map objects in addition to plain > // objects. > function assertStructurallyEquivalent(actual, expected, path="root") { Wonder if we should roll this into the `breakdownEquals` function I made for breakdowns, if we add map support, and just have it a general structural equiv function?
Attachment #8675976 -
Flags: review?(jsantell) → review+
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #4) > Comment on attachment 8675976 [details] [diff] [review] > Implement `allocationSite` breakdown for CensusTreeNode > > Review of attachment 8675976 [details] [diff] [review]: > ----------------------------------------------------------------- > > some comments but lgtm! > > ::: devtools/shared/heapsnapshot/census-tree-node.js > @@ +61,5 @@ > > + * @returns {String} > > + * The unique string that can be used as a key in a FrameCache. > > + */ > > +FrameCache.hash = function (frame) { > > + return `${frame.functionDisplayName},${frame.source},${frame.line},${frame.column},${frame.asyncCause}`; > > Do we always have a column? What about when functions don't have names? Not > sure if SavedFrames handles this better than the profiler (I think it does, > and tbf it's not hard to handle this better than profiler); > > A line like: `p.then(function(){},function(){})` where two anon functions > are used Yes, we always have a column. SpiderMonkey will infer display names in most cases, and worst case scenario it will be undefined, but that's ok we still want that to contribute to the hash as it is part of each frame's identity. > @@ +188,5 @@ > > } > > > > // Deep structural equivalence that can handle Map objects in addition to plain > > // objects. > > function assertStructurallyEquivalent(actual, expected, path="root") { > > Wonder if we should roll this into the `breakdownEquals` function I made for > breakdowns, if we add map support, and just have it a general structural > equiv function? What's nice about this function now is that it keeps track of where you are in the structure via the path parameter and asserts along the way rather than returning true/false which gives better failure messages. Both of these things you would not want in an equality checker because (a) you want to be fast and not carry around long strings, and (b) you don't want to assert but return true or false. Additionally, it does not attempt to handle cyclic values at all, which a robust equality checker handling untrusted data should. I think we should keep this as a test utility.
Backed out for m(oth) failures: https://treeherder.mozilla.org/logviewer.html#?job_id=5219453&repo=fx-team https://hg.mozilla.org/integration/fx-team/rev/101384a5c8c9
Flags: needinfo?(nfitzgerald)
Looks like it also broke an xpcshell test: https://treeherder.mozilla.org/logviewer.html#?job_id=5219176&repo=fx-team
Assignee | ||
Comment 10•9 years ago
|
||
Attachment #8676889 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Attachment #8675976 -
Attachment is obsolete: true
Assignee | ||
Comment 11•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=fb080004c158
Assignee | ||
Comment 12•9 years ago
|
||
New try push, apparently that last one was affected by the S3 migration. https://treeherder.mozilla.org/#/jobs?repo=try&revision=7ae2f6266fdf
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 13•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/3e148d8f5e05
Keywords: checkin-needed
Comment 14•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/b408336f4b90226a9617d022c1c768008c6861e2 Backed out changeset 3e148d8f5e05 (bug 1201542) for XPCShell bustage
Comment 15•9 years ago
|
||
Busted XPCSHell tests like this -> https://treeherder.mozilla.org/logviewer.html#?job_id=5260235&repo=fx-team I had to back out bug 1217239 as it's dependent on this one.
Flags: needinfo?(nfitzgerald)
https://hg.mozilla.org/mozilla-central/rev/e5d4bd62d234
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(nfitzgerald)
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•