- Godmar--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Regards,
Tim.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.
>I'm not familiar enough with node.js code to tell what should be
> This is with Chrome stable: Version 28.0.1500.52 m
> The snapshot was created in node.js; not sure which version of v8 that was
> using.
considered as global objects there. Looking at the attached
screenshot, I'd assume that there is a DOMWindow instance which is a
global object for a given context. Could you provide more details on
how you took the snapshot and how we could reproduce this?
Hi Godmar,With enabled system properties I can see that the window property is held by an accessor closure (getter or setter) of location property in HTMLDocument.However in normal flow there should be named closure shortcuts get-location and set-location present in the snapshot. Once they are there the path to the global roots should be visible even if "show objects' hidden properties" option is off.It is very interesting to track down why these shortcuts are not created. Could you please share the snapshot file?
If there is a strong reference from C++ to an object, how would this information be represented in the heap dump file?
Does it say: "this is pinned by native code", or is it the absence of an incident edge that would allow this conclusion?
And if it can be determined that an object is kept alive from C++, does the heap inspector visualize this information?
It is possible that in our environment some of the assumptions under which the heap inspector was developed do not hold. I'm just trying to understand to what extent my lack of understanding is caused by the heap inspector not displaying something vs. v8 not dumping the necessary information, vs. possible v8 internal bugs, vs. errors in my application code (a strong ref from js code, or failure to unpin by our C++ code). To that end, I was hoping to track the object that fails to get collected to its roots.
On that node, I've attached another screenshot where I discovered a possible path. Here I started with the Containment view and drilled down one of those objects (@650507). After expanding a few levels deep I came across builtins @674015, which also appears on the retaining tree of my suspect object @673633. In other words, there's a path @650507 -> @674015 -> @673633, even though the heap inspector doesn't easily reveal it. You can approach the path in the containment pane top down until you reach @674015, and you can approach the path bottom up in the retaining tree window until you each @674015, but you don't see the entire path.Is there an explanation as to why the path is split in this way? Is there any significance to the object 'builtin @674015' that would justify that?Is my conclusion that @650507 is really what's keeping @673633 alive correct?
- Godmar
It is possible that in our environment some of the assumptions under which the heap inspector was developed do not hold. I'm just trying to understand to what extent my lack of understanding is caused by the heap inspector not displaying something vs. v8 not dumping the necessary information, vs. possible v8 internal bugs, vs. errors in my application code (a strong ref from js code, or failure to unpin by our C++ code). To that end, I was hoping to track the object that fails to get collected to its roots.On that node, I've attached another screenshot where I discovered a possible path. Here I started with the Containment view and drilled down one of those objects (@650507). After expanding a few levels deep I came across builtins @674015, which also appears on the retaining tree of my suspect object @673633. In other words, there's a path @650507 -> @674015 -> @673633, even though the heap inspector doesn't easily reveal it. You can approach the path in the containment pane top down until you reach @674015, and you can approach the path bottom up in the retaining tree window until you each @674015, but you don't see the entire path.Is there an explanation as to why the path is split in this way? Is there any significance to the object 'builtin @674015' that would justify that?Is my conclusion that @650507 is really what's keeping @673633 alive correct?The problem is in how heap snapshotter in v8 defines embedder root objects it places on top level.Currently it looks up for JSGlobalProxy in entire heap and consider them as global [window] objects.In your case it happened to be DOMWindow @650507, DOMWindow @36553, and @697.
Then the distance for rest of the heap objects is calculated starting from these global objects.That logic works pretty well for Blink, but seems to break for other embedders.We're considering changing the algorithm of defining global objects. It should probably not treat an object as global if nobody holding a native handle on it.
Cheers,AlexeiP.S. as a small bonus I've managed to track the real retainment path for the DOMWindow @650507 (please see the attached screenshot).
P.S. as a small bonus I've managed to track the real retainment path for the DOMWindow @650507 (please see the attached screenshot).
On Tue, Jun 25, 2013 at 2:06 PM, Alexei Filippov <al...@google.com> wrote:
It is possible that in our environment some of the assumptions under which the heap inspector was developed do not hold. I'm just trying to understand to what extent my lack of understanding is caused by the heap inspector not displaying something vs. v8 not dumping the necessary information, vs. possible v8 internal bugs, vs. errors in my application code (a strong ref from js code, or failure to unpin by our C++ code). To that end, I was hoping to track the object that fails to get collected to its roots.On that node, I've attached another screenshot where I discovered a possible path. Here I started with the Containment view and drilled down one of those objects (@650507). After expanding a few levels deep I came across builtins @674015, which also appears on the retaining tree of my suspect object @673633. In other words, there's a path @650507 -> @674015 -> @673633, even though the heap inspector doesn't easily reveal it. You can approach the path in the containment pane top down until you reach @674015, and you can approach the path bottom up in the retaining tree window until you each @674015, but you don't see the entire path.Is there an explanation as to why the path is split in this way? Is there any significance to the object 'builtin @674015' that would justify that?Is my conclusion that @650507 is really what's keeping @673633 alive correct?The problem is in how heap snapshotter in v8 defines embedder root objects it places on top level.Currently it looks up for JSGlobalProxy in entire heap and consider them as global [window] objects.In your case it happened to be DOMWindow @650507, DOMWindow @36553, and @697.Before I dig deeper into v8's internal, could you briefly describe what a JSGlobalProxy does and how it is created.In looking at Contextify, I do not immediately see any uses of it. I'm guessing that it represents a global scope, something a browser would create for every window?
Then the distance for rest of the heap objects is calculated starting from these global objects.That logic works pretty well for Blink, but seems to break for other embedders.We're considering changing the algorithm of defining global objects. It should probably not treat an object as global if nobody holding a native handle on it.So, that means that the heap snapshot has information about what's being held by native code? BTW, when we say "held by native code", what do we mean specifically? Objects referred to using a "Persistent<>" handle, along with objects referred to via Local handles whose HandleScopes are still active?
Cheers,AlexeiP.S. as a small bonus I've managed to track the real retainment path for the DOMWindow @650507 (please see the attached screenshot).I'm actually interested in DOMWindow @673633.But, let me ask another question. When it says in the snapshot "[1192] in (Global handles) @27", does that means that there's a 'Persistent<>' handle created by native code?
Or what else is the 'Global handles' array?