Using and Extending Memory Analyzer into Uncharted Waters at EclipseCon 2011

Vladimir first introduced to the audience problems such as:

  • Tracking memory leaks : hard to debug and leading to OutOfMemory errors
  • Thread issues : deadlocks, exhausted threads, waiting for external resources, such as DB connection

To solve those problems, you can use Eclipse Memory Analyzer, which is :

  • a Java Heap Analyzer
  • it helps find memory leaks and reduce memory consumption
  • UI and programmatic access to data in the heap dumps
  • faster then competitors, such as JHat
  • not that intrusive (in terms of memory overhead)
  • supporting a lot of JVM (Sun, SAP, 1.4.2 and above)
  • providing an automatic problem recognition

Then, on to the demo ! Dimitar,

  • loaded a thread dump (very fast to startup)
  • showed to us some problems found by the application, such as leak suspects
  • and some views such as memory consumed by objects, the states of the threads, etc…

Back to the presentation, Vladimir explained how you can extend the tool (you can extend it to save time doing the same thing repeatedly, to share view configurations, etc…)

There are several ways to access a snapshot

  • through the API : ISnapshot, Iclass, IObject, IArray
  • extensions points : NameResolver (descriptions of objects) ; Query, for exploring dumps or detailed analysis, in a form of table, tree, histogram ; RequestResolver, to provide the details of what a thread is doing; Vladimir also told us about the presence of 6 other extension points

 

 

http://www.eclipsecon.org/2011/sessions/?page=sessions&id=2184