Hi there,
As mentioned in the following:
https://developers.google.com/chrome-developer-tools/docs/heap-profiling#views_summary
The object IDs are the same among multiple snapshot taken. This is true when using Chrome Developer Tools in the browser. However, this is not true when using remote debugging to take heap snapshot. Is this a bug? Is there any fix for it?
Thanks --
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.
Does this mean that if an object is not collected, its object id remains the same?
According to the experiment I've done, object ids do not remain the same when remotely debugging a page. I checked it on an empty page, taking two snapshots using chrome developer tools in the browser. The object ids were the same as far as I checked. However, when using remote debugging protocol the object ids of corresponding objects were different.
Is the part of code responsible for generating heap snapshot in remote debugging protocol different from the part that is used in chrome developer tools in browser?
How is it possible to fix this bug for remote debugging?
When I'm talking about object ids, I mean the object ids that are included in the heap snapshot. I use the Profiler domain in remote debugging protocol, take the whole snapshot, and find the object ids. It has nothing to do with Runtime domain.
I use the following command:
chrome.debugger.sendCommand(debuggee, "Profiler.takeHeapSnapshot", {"detailed":true}, callback);
and then process the heapsnapshot considering the following meta information:
Object {node_fields: Array[5], node_types: Array[7], edge_fields: Array[3],edge_types: Array[3]}
The object IDs are the third field as indicated above. Are you saying the above ID is equal to remote object id in runtime domain?
Would you please answer my previous questions regarding this clarification as those questions are yet unanswered.
On Mon, Feb 25, 2013 at 10:25 PM, Masoomeh Rudafshani <masoomeh....@gmail.com> wrote:
Does this mean that if an object is not collected, its object id remains the same?
Yes, if a tracked object survives GC then its id will be the same.According to the experiment I've done, object ids do not remain the same when remotely debugging a page. I checked it on an empty page, taking two snapshots using chrome developer tools in the browser. The object ids were the same as far as I checked. However, when using remote debugging protocol the object ids of corresponding objects were different.
Note that remote objects ids used in remote debugging protocol has nothing to do with the heap profiler object ids. They are to different worlds and in the remote debuggin protocol we currently may return new id for the same object when you say evaluate an expression that results in the object. You shouldn't mix remote object id with heap snapshot object ids.
Is the part of code responsible for generating heap snapshot in remote debugging protocol different from the part that is used in chrome developer tools in browser?
Yes. Object id returned in reply to Runtime.evaluate command has nothing to do with heap snapshot ids.
How is it possible to fix this bug for remote debugging?
There is HeapProfiler.getObjectByHeapObjectId command that allows to translate heap snapshot object id into remote object id.
The clarifications are inlined.On Tue, Feb 26, 2013 at 7:11 AM, Yury Semikhatsky <yu...@chromium.org> wrote:
On Mon, Feb 25, 2013 at 10:25 PM, Masoomeh Rudafshani <masoomeh....@gmail.com> wrote:
Does this mean that if an object is not collected, its object id remains the same?
Yes, if a tracked object survives GC then its id will be the same.According to the experiment I've done, object ids do not remain the same when remotely debugging a page. I checked it on an empty page, taking two snapshots using chrome developer tools in the browser. The object ids were the same as far as I checked. However, when using remote debugging protocol the object ids of corresponding objects were different.
Note that remote objects ids used in remote debugging protocol has nothing to do with the heap profiler object ids. They are to different worlds and in the remote debuggin protocol we currently may return new id for the same object when you say evaluate an expression that results in the object. You shouldn't mix remote object id with heap snapshot object ids.
Please note that I'm not mixing remote object id with heap snapshot object ids. I'm always talking about heap snapshot ids. So, the above question in unanswered yet! Basically what I'm asking is the different behaviour I see when taking a heap snapshot manually (using chrome developer tools) and when taking a snapshot by a program using profiler domain.
Is the part of code responsible for generating heap snapshot in remote debugging protocol different from the part that is used in chrome developer tools in browser?
Yes. Object id returned in reply to Runtime.evaluate command has nothing to do with heap snapshot ids.
Again this question in unanswered since I'm not at all taking about Runtime domain. I'm always taking about profiler domain,
The question is how come the part responsible for generating heap snapshot object id is different (in Chrome developer tools and in Profiler domain of remote debugging) while they both produce a heap snapshot?