Thursday, November 11, 2010

Extending the Eclipse Memory Analyzer

I usally don't post links here but I always wanted to describe here how to extend the Eclipse Memory Analyzer. Since there's now a Slide Deck available that describes briefly how it can be done at
http://www.slideshare.net/AJohnson1/extending-eclipse-memory-analyzer it's not that urgent anymore to post a description here ;-)


I believe there's a huge potential in extending MAT for specific use cases, such as Android, Jruby, Scala etc.

14 comments:

Eric Cloninger said...

We use MAT at Motorola in our product. We made extensions to make the workflow easier with the Android plugins. Also, we added a filter so messages that aren't relevant to your app don't affect the results. It's a great feature but I'm afraid that most users don't understand the output well enough to take full advantage of what it's reporting.

Markus Kohler said...

Hi Eric,
Thanks for leaving a message here!
Are you saying that MAT is used/included in Moto devstudio?
I wasn't aware oft this, but of course I'm excited :-)

You are right, the standard MAT reports were developed for huge (gigabytes of memory) enterprise applications and are not necessarily useful for the much smaller Android applications.

Features that immediately:
Support dalvik natively or at least get more information into MAT, such as which objects are shared, or how big some native objects are (Bitmaps)

Support specific android queries.
I believe certain typical memory leaks could be detected automatically and since android heap dumps are small, one could automatically check them for typical issues, during a continuous integration process.

The UI could certainly be improved from a usabilty point of view.

Regards,
Markus

Eric Cloninger said...

Hi Markus,

Yes, we bundle MAT and have since our March release. The dev team suggested it and did some magick with OQL. We made the workflow a bit less confusing to the casual user, but it was amazingly painless to integrate. Perhaps this a good topic for an Eclipsecon talk. If you want to chat about it, shoot me an email to my motorola.com address. (ericc@)

tennisworld-tennis said...

Nice one. Actually when we doing programming we never think about these kind of memory issues thanks for publishing

Important said...

Sun Java Certification (Newbie)
http://career-assessments.blogspot.com/2008/01/sun-java-certifications.html
SCJA/SCJP/SCJD/SCWCD/SCMA/SCEA… Aspirants
http://career-assessments.blogspot.com/2008/01/sun-java-certifications-aspirants.html
Free Cisco eBooks – Download
http://career-assessments.blogspot.com/2008/01/cisco-certifications-aspirants.html
Looking for Cisco Certification
http://career-assessments.blogspot.com/2008/01/cisco-certifications-newbies.html
Important Networking Information
http://ccnahelpguides.blogspot.com

upcreditscore.info said...

Why don't you continue this site with good posts. Really like to read your some posts

Ecommerce web development said...

Great post on how to extend the Eclipse Memory Analyzer. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. Thanks for sharing the information with us.

Joe Bowbeer said...

I see a lot of potential for scripted use of heap analysis in CI and testing. In those cases it would be convenient to be able to run a list of queries and compare the results with predetermined thresholds. However, I don't see any indication that anyone is doing this, nor do I know how to run a script of queries using MAT in a batch command. Pointers?

Markus Kohler said...

Hi Joe,
Check http://dev.eclipse.org/mhonarc/lists/mat-dev/msg00150.html
Hope that helps.
Regards,
Markus

Joe Bowbeer said...

Thanks! That was helpful, and Jevgeni pointed me to the stripped-down MAT they created for their command line diagnostic tool:

bitbucket.org/ekabanov/mat

Markus Kohler said...

Hi Joe,
Thanks as well!
I wasn't aware of this project.
Regards,
Markus

Magento Development said...

I see great potential for use in clinical trials in business analysis and testing. In these cases, it is useful to run the query list, and then with a specified threshold value for the result of the comparison. However, I do not know how to run a script since pad query I sign any was running, it will not be displayed. Pointer?

Magento Developer said...

I see great potential for use in the analysis of CI scenario and lots of tests. In such cases, it would be desirable to examine the list and compare the results with all thresholds. However, I see no sign that anyone do this, or how to execute a query using the software script MAT team. Pointers?

Android App Developer said...

I see great potential for use in the analysis of CI scenario and lots of tests. In such cases, it would be desirable to examine the list and compare the results with all thresholds. However, I see no sign that anyone do this, or how to execute a query using the software script MAT team. Pointers?