How to tell which thread(s) are producing all the garbage?
Posted
by Brad Hein
on Stack Overflow
See other posts from Stack Overflow
or by Brad Hein
Published on 2010-05-27T02:17:06Z
Indexed on
2010/05/27
2:21 UTC
Read the original article
Hit count: 244
I have an app with about 15 threads. Most do mundane tasks and sleep most of their lives. Others collect information and cache it in hashmaps. The hashmaps grow to a moderate size and level out. The number of keys and size of value remains constant, but the contents of the values changes (at 33 keys per second average).
When I start my app, I notice the garbage collection interval goes from minutes to once per second, and the amount of garbage is 700k+ each time.
In fact as I was writing this, it caused my phone to reboot with an error "Referencetable Overflow".
Here's my question: Are there any tricks to identifying which threads are producing the garbage, or even finding out more about what garbage they are producing?
© Stack Overflow or respective owner