Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment: Use MAT for analyzing heapdumps from ruby #27

Open
eclipsewebmaster opened this issue May 8, 2024 · 3 comments
Open

Experiment: Use MAT for analyzing heapdumps from ruby #27

eclipsewebmaster opened this issue May 8, 2024 · 3 comments

Comments

@eclipsewebmaster
Copy link

| --- | --- |
| Bugzilla Link | 498944 |
| Status | NEW |
| Importance | P3 enhancement |
| Reported | Aug 01, 2016 02:23 EDT |
| Modified | Nov 20, 2019 18:06 EDT |
| See also | Gerrit change https://git.eclipse.org/r/78241 |
| Reporter | Krum Tsvetkov |

Description

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.

@eclipsewebmaster
Copy link
Author

By Krum Tsvetkov on Aug 01, 2016 02:34

Created attachment 263401
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.

org.eclipse.mat.ruby_1.0.0.201608010829.jar

@eclipsewebmaster
Copy link
Author

By Krum Tsvetkov on Aug 01, 2016 02:35

Somehow my gerrit change list didn't get automatically reported here. This is it:
https://git.eclipse.org/r/#/c/78241/2

@eclipsewebmaster
Copy link
Author

By Pierre-Yves Bigourdan on Nov 20, 2019 18:06

This would be a nice addition to the MAT project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant