Re: [Chrome DevTools] Heap snapshot relocation_info

994 views
Skip to first unread message

Ilya Tikhonovsky

unread,
Mar 25, 2013, 5:01:06 AM3/25/13
to James, Google Chrome Developer Tools
the most useful strategy to fight against memory leaks was described here http://stackoverflow.com/questions/11969062/tool-to-track-down-javascript-memory-leak/12061206

---------------------------------

You can use the next scenario for finding memory leaks.

  1. open devtools profiler
  2. do an action that makes a leak
  3. take a heap snapshot
  4. repeat steps 2 and 3 tree times
  5. select the latest heap snapshot
  6. change filter "All Object" to "Objects between Snapshot 1 and 2"

After that you will see objects a set of leaked objects. You can select an object and look at the list of retainers in Object's retaining tree

--------------------------


Regards,
Tim.


On Sat, Mar 23, 2013 at 1:09 AM, James <jameswa...@gmail.com> wrote:
I am trying to pinpoint the source of a suspected memory leak in Javascript code and am currently trying to do so through heap snapshot comparisons. (compiled code) and (array) definitely appear to be growing without bounds over time. Under (compiled code), there are a significant number of entries under which there is a relocation_info entry. What does relocation_info mean? I have attached a screenshot. 

Thanks and looking forward to your feedback.

--
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.
 
 

Ilya Tikhonovsky

unread,
Mar 25, 2013, 5:22:23 AM3/25/13
to James, Google Chrome Developer Tools
the general strategy is to:
1) find a leaked object
2) look into retainers tree and find in the shortest path the fist object that is definitely not a leak.
3) fix the problem with the edge from the 'not a leak object'
4) repeat steps 1-3 N times because the leaked object with the smallest distance may have many retainers with the same or greater distance.

Please be sure that you run a fresh instance of chrome, have no breakpoints, no console messages, don't use elements panel, because all these actions may get a pointer to an object inside javascript heap.

relocation_info objects keep information about generated code. So the number of such objects may increase when you call eval or when v8 does code optimization.



Regards,
Tim.

Regards,
Tim.

James

unread,
Mar 25, 2013, 9:08:21 AM3/25/13
to google-chrome-...@googlegroups.com
Tim,
 
Thank you for your feedback. I will do as you recommend.

Regards,
Tim.



Regards,
Tim.


To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



Regards,
Tim.


On Mon, Mar 25, 2013 at 1:01 PM, Ilya Tikhonovsky <loi...@chromium.org> wrote:
the most useful strategy to fight against memory leaks was described here http://stackoverflow.com/questions/11969062/tool-to-track-down-javascript-memory-leak/12061206

---------------------------------

You can use the next scenario for finding memory leaks.

  1. open devtools profiler
  2. do an action that makes a leak
  3. take a heap snapshot
  4. repeat steps 2 and 3 tree times
  5. select the latest heap snapshot
  6. change filter "All Object" to "Objects between Snapshot 1 and 2"

After that you will see objects a set of leaked objects. You can select an object and look at the list of retainers in Object's retaining tree

--------------------------


Regards,
Tim.


On Sat, Mar 23, 2013 at 1:09 AM, James <jameswa...@gmail.com> wrote:
I am trying to pinpoint the source of a suspected memory leak in Javascript code and am currently trying to do so through heap snapshot comparisons. (compiled code) and (array) definitely appear to be growing without bounds over time. Under (compiled code), there are a significant number of entries under which there is a relocation_info entry. What does relocation_info mean? I have attached a screenshot. 

Thanks and looking forward to your feedback.

--
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-developer-tools+unsub...@googlegroups.com.

Robert Gary

unread,
Jun 1, 2015, 4:16:09 PM6/1/15
to google-chrome-...@googlegroups.com
Has anyone found a solution to this? I also find that "Compiled Code" and "Array" grow the entire time my application is up. The profiler isn't very helpful because none of my JavaScript is shown in the stack. 

-Robert

Yury Semikhatsky

unread,
Jun 2, 2015, 4:27:19 AM6/2/15
to Google Chrome Developer Tools
Hi Robert,

Can you described your use case in more details?

Yury

On Mon, Jun 1, 2015 at 11:13 PM, Robert Gary <rober...@gmail.com> wrote:
Has anyone found a solution to this? I also find that "Compiled Code" and "Array" grow the entire time my application is up. The profiler isn't very helpful because none of my JavaScript is shown in the stack. 

-Robert

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/e21f8fe5-791f-4942-854d-481178bdef3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages