We're having real difficulty using the comparisons view to correlate back to the root reference. I appreciate your very busy however if you can provide any quick guidance I'd really appreciate it. From the help I see
various screenshots however they seem to relate to an older version perhaps?
https://developers.google.com/chrome-developer-tools/docs/heap-profiling
e.g. the section on the summary view mentions a label "Click on an object to show retaining paths" however this isn't present on my version. Similarly the screenshots have icons for "Profiles" however I only see the labels
Your last note is correct. The current version of the heap profiling documentation is out of date, but we're working on rewriting all of the docs for a push this month. The current version of the heap profiler will always trace to window objects and expands to display the retained tree when you select an object in either the summary or comparison views.
Are you using Canary for your comparisons? Note that depending on the type of object, there may be no retained path information displayed (e.g if no information is available for a parent object, you need to dig down/expand into its children in order to view retained path info).
Thanks IllyaFew points1) Going back to my earlier comment to Addy on not being able to view the retaining path for the detached nodes how do you suggest we see them? Addy indicated the documentation was out of date
2) I presume you mean repeat the test a number of times e.g. 5 and then use the comparison view between the initial snapshot and last e.g. 1 and 5.
I did this and noticed a number of DOM nodes where some are highlighted in red and indicated as a "Detached DOM tree" however although these nodes are familiar to our applications it's not obvious why they should be retained. e.g. one is a standard Dojo widget which we see destroyed in our logs
1) Going back to my earlier comment to Addy on not being able to view the retaining path for the detached nodes how do you suggest we see them? Addy indicated the documentation was out of date
On the screenshot you sent you selected HTMLImageElement constructor which groups all instances with such constructor and to see their retainers tree you should select particular instance as Ilya suggested. Doesn't it work for you?
2) I presume you mean repeat the test a number of times e.g. 5 and then use the comparison view between the initial snapshot and last e.g. 1 and 5.
Not quite. The idea is to use the summary view but leave there only objects allocated in some time interval. To do so you take snapshot 1, then do some actions which is expected to allocate some objects, then you take second snapshot to mark the end of the interval where the objects of interest were allocated, do some actions that should result in garbage collection of the objects allocated earlier and then take snapshot 3. After that select summary view of snapshot 3 and chose to show only "Objects allocated between snapshots 1 and 2". If there are no leaks the summary view should be empty.
Red nodes don't have direct references from javascript to them. But the nodes are a part of some detached DOM tree which contain other nodes some of which are referenced from javascript and thus prevent the whole DOM tree from beeing GCed. You should look for yellow nodes in the same detached dom tree to find references from javascript. Yellow nodes are those that do have references from javascript.
Thanks
1) Going back to my earlier comment to Addy on not being able to view the retaining path for the detached nodes how do you suggest we see them? Addy indicated the documentation was out of date
On the screenshot you sent you selected HTMLImageElement constructor which groups all instances with such constructor and to see their retainers tree you should select particular instance as Ilya suggested. Doesn't it work for you?You can select a particular element in the retaining tree however it doesn't indicate the full path to it's root object as the online documentation shows ( which Addy said was out of date )
2) I presume you mean repeat the test a number of times e.g. 5 and then use the comparison view between the initial snapshot and last e.g. 1 and 5.Not quite. The idea is to use the summary view but leave there only objects allocated in some time interval. To do so you take snapshot 1, then do some actions which is expected to allocate some objects, then you take second snapshot to mark the end of the interval where the objects of interest were allocated, do some actions that should result in garbage collection of the objects allocated earlier and then take snapshot 3. After that select summary view of snapshot 3 and chose to show only "Objects allocated between snapshots 1 and 2". If there are no leaks the summary view should be empty.This isn't really possible i.e. we click on a menu item which refreshes an inner div ( a Dojo content pane ). The div is loaded with the value from another HTML page to present a list. The snapshot 1 in your example above would be when the inner div is loaded with the list. However you have to refresh the list again to destroy and recreate so in relation to "do some actions that should result in garbage collection of the objects allocated earlier" we have to reload the div which should destroy the inner div objects however it also reloads immediately. Are you suggesting we add a link to the site perhaps to try and do an internal clean up of the div and then take snapshot 2?
Red nodes don't have direct references from javascript to them. But the nodes are a part of some detached DOM tree which contain other nodes some of which are referenced from javascript and thus prevent the whole DOM tree from beeing GCed. You should look for yellow nodes in the same detached dom tree to find references from javascript. Yellow nodes are those that do have references from javascript.Thanks so can we take any further action with respect to red nodes if we only concentrate on yellow nodes?
1) Going back to my earlier comment to Addy on not being able to view the retaining path for the detached nodes how do you suggest we see them? Addy indicated the documentation was out of dateOn the screenshot you sent you selected HTMLImageElement constructor which groups all instances with such constructor and to see their retainers tree you should select particular instance as Ilya suggested. Doesn't it work for you?
You can select a particular element in the retaining tree however it doesn't indicate the full path to it's root object as the online documentation shows ( which Addy said was out of date )
Yes. The documentation is out of date. We do not calculate the full retaining path as a string. The pane with list of retaining paths were replaced with retainer tree pane.
2) I presume you mean repeat the test a number of times e.g. 5 and then use the comparison view between the initial snapshot and last e.g. 1 and 5.Not quite. The idea is to use the summary view but leave there only objects allocated in some time interval. To do so you take snapshot 1, then do some actions which is expected to allocate some objects, then you take second snapshot to mark the end of the interval where the objects of interest were allocated, do some actions that should result in garbage collection of the objects allocated earlier and then take snapshot 3. After that select summary view of snapshot 3 and chose to show only "Objects allocated between snapshots 1 and 2". If there are no leaks the summary view should be empty.This isn't really possible i.e. we click on a menu item which refreshes an inner div ( a Dojo content pane ). The div is loaded with the value from another HTML page to present a list. The snapshot 1 in your example above would be when the inner div is loaded with the list. However you have to refresh the list again to destroy and recreate so in relation to "do some actions that should result in garbage collection of the objects allocated earlier" we have to reload the div which should destroy the inner div objects however it also reloads immediately. Are you suggesting we add a link to the site perhaps to try and do an internal clean up of the div and then take snapshot 2?
The three snapshot schema works fine with this situation. You don't need to cleanup your list manually.
With attached file ChromeHeapProfilerComparisonScreenshots-4.docxOn Wed, Jan 16, 2013 at 2:20 PM, Matt Adamson <matad...@googlemail.com> wrote:
1) Going back to my earlier comment to Addy on not being able to view the retaining path for the detached nodes how do you suggest we see them? Addy indicated the documentation was out of dateOn the screenshot you sent you selected HTMLImageElement constructor which groups all instances with such constructor and to see their retainers tree you should select particular instance as Ilya suggested. Doesn't it work for you?
You can select a particular element in the retaining tree however it doesn't indicate the full path to it's root object as the online documentation shows ( which Addy said was out of date )
Yes. The documentation is out of date. We do not calculate the full retaining path as a string. The pane with list of retaining paths were replaced with retainer tree pane.In this case then the retaining pane tree view shows more than one element as the root sometimes. e.g. in the screen shot attached.
Is this implying that the grid function has a reference to this DOM node indirectly?
If this is the case what is reference the grid function to stop it being garbage collected?