Community
Participate
Working Groups
Recently I had to deal with a an issue, which looked like a memory leak in a ruby program. It turned out that ruby offers already means to create a heap dump (http://ruby-doc.org/stdlib-2.1.0/libdoc/objspace/rdoc/ObjectSpace.html), however I didn't find tools comparable to MAT to read the information. I gave it a try and wrote a parser extension for MAT for the ruby dumps. At the end I think this helped me quite well with the analysis. However, MAT is still very Java-focused, and I had to fake a few things, like - classloader - superclasses (I didn't find the info in the heap dump) - the pseudo refs from each object to its class which we put for the java dumps (the parsing didn't work without such refs) On the other hand, I had to leave a few infos out, e.g. allocation information. For a non-java developer the combination could look quite confusing I think. I'll share in gerrit the code I have. So far it was more for fun (and to help myself) exercise. Let's see / discuss if MAT can offer support for ruby dumps, so that a ruby developer could perform reasonable analysis, and not be very confused by all the functionality which was faked or which doesn't work with the ruby dumps. There were already some postings about javascript dumps on the mailing list, so obviously extending MAT to support other languages doesn't sound too awkward.
Created attachment 263401 [details] a pre-built eclipse plugin Adding a pre-built eclipse plugin. This way one could try the new parser without having to run MAT from source. - download latest mat - copy the attached jar into <MAT>/plugins - copy the gson parser (e.g. from orbit http://download.eclipse.org/tools/orbit/downloads/drops/R20130118183705/repository/plugins/com.google.gson_2.1.0.v201203072145.jar) to <MAT>/plugins - open heap dumps from ruby (extension of the files must be .json)
Somehow my gerrit change list didn't get automatically reported here. This is it: https://git.eclipse.org/r/#/c/78241/2
This would be a nice addition to the MAT project!
This issue has been migrated to https://github.com/eclipse-mat/org.eclipse.mat/issues/27.