title: Android: Track number of objects created
body: <p>I'm porting a game to Android (there's a lot of code and very little of it is mine), and DalvikVM is telling me (through LogCat) all about the garbage collection. At some point in the code, I get a stream of "GC freed x objects / x ms" messages, basically informing me that ~150,000 objects have just been deleted and it's taking a full second.</p>
  
  <p>I want to know where these came from! I am pretty sure I'm not creating that many objects intentionally.</p>
  
  <p>So, is there a way to get... basically the opposite of that message? Something that prints a log message when any object is <em>created</em>?</p>
  
  <p>That way I could step over the code, checking how many messages are generated, and seeing which parts of code are generating the objects. I suspect some form of object creation in part of a loop, but if possible this would be an easy way to tell for sure.</p>
  
  <p>I'm using <code>Eclipse 3.4.2</code>, if that's relevant.</p>
  
  <p>Any ideas?</p>