Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Memory Analyzer (MAT) » Any plans to support C++?
Any plans to support C++? [message #483690] Wed, 02 September 2009 15:34 Go to next message
Marc is currently offline MarcFriend
Messages: 25
Registered: July 2009
Junior Member
hi,

do you have any plans adding C++ specific memory analyzer? if no, how
easy/difficult would it be to re-use existing plug-ins?

thanks,
Marc
Re: Any plans to support C++? [message #483956 is a reply to message #483690] Thu, 03 September 2009 18:17 Go to previous messageGo to next message
Andreas Buchen is currently offline Andreas BuchenFriend
Messages: 123
Registered: July 2009
Senior Member
> do you have any plans adding C++ specific memory analyzer? if no, how
> easy/difficult would it be to re-use existing plug-ins?

Sorry, no plans at all. Just no Know-how. Could one reuse stuff? Maybe.
There is a Plug-in mechanism, but the Memory model is probably too Java
specific. Take a look at the org.eclipse.mat.api bundle to get an idea of
the API. Send an email if you have questions.
Re: Any plans to support C++? [message #484977 is a reply to message #483956] Thu, 10 September 2009 05:37 Go to previous messageGo to next message
Marc is currently offline MarcFriend
Messages: 25
Registered: July 2009
Junior Member
thanks.

do you have a developer guide? so far, I found your slides showing APIs.
is there any further explanation (eg Collections, Finalizer.. Snapshot,
Parser?)?

also, am unable to find source code in cvs. aren't you under
cvsroot/technology?

thaks,
Marc
Re: Any plans to support C++? [message #486076 is a reply to message #484977] Wed, 16 September 2009 09:35 Go to previous messageGo to next message
Andreas Buchen is currently offline Andreas BuchenFriend
Messages: 123
Registered: July 2009
Senior Member
Hi Marc,

with respect to a developer guide, there is some room for improvement - to
put it nicely. Let me try to give you some hints to get started.

> do you have a developer guide? so far, I found your slides showing APIs.
> is there any further explanation (eg Collections, Finalizer.. Snapshot,
> Parser?)?

To setup your local development, follow these instructions on the WIKI:
http://wiki.eclipse.org/index.php?title=MemoryAnalyzer/Contr ibutor_Reference

The follow the code. Basically there are two ways to extend the Memory
Analyzer. One way is adding features which operate on the heap dump. We
call those "queries". All the (context) menus like "Java Basics" and "Java
Collections" etc. are implemented as queries.

Queries can be found in these packages:
org.eclipse.mat.inspections.*

The queries use the following API to implement their functionality:
org.eclipse.mat.snapshot.*
org.eclipse.mat.snapshot.model.*

The queries work like this: implement the IQuery interface and configure
the extension in the plugin.xml. To define input parameter, use the
@Argument annotation. Based on these annotations, we decided whether the
query is shown in a particular context menu.


The second way to extend MAT is by providing a heap dump reader. Currently
there are two supported formats: hprof and dtfj. The implementation can be
found in the two projects org.eclipse.mat.hprof and org.eclipse.mat.dtfj.
They implement the parser interface, which in turn in found in the
org.eclipse.mat.parser project.

In the case of HPROF, the "music plays" in the HprofIndexBuilder class.
This is called to initially build the indeces (inbound, outbound object
graphs etc.) and the re-create the Java classes from the heap dump.

The second class is called HprofHeapObjectReader and is used to create
objects representing Java instances while doing the analysis - e.g.
reading the attributes, field values, etc.


> also, am unable to find source code in cvs. aren't you under
> cvsroot/technology?

We use a subversion repository. The source is located here:
http://dev.eclipse.org/svnroot/technology/org.eclipse.mat


Andreas.
Re: Any plans to support C++? [message #499222 is a reply to message #483690] Fri, 20 November 2009 13:25 Go to previous message
Krum Tsvetkov is currently offline Krum TsvetkovFriend
Messages: 164
Registered: July 2009
Senior Member
Hi Marc,

As Andreas already answered we have no experience in doing memory analysis for C++.
One thing however we were discussing is if we could somehow provide tools to analyze shortages in the native memory of a Java process. Also there, the experience we have is very limited.
So, two minutes ago I hit the "reply' button, but I actually wanted to ask you a question (and other people reading the forum).
Are there any ideas around what kind of problems exist related to the native space in Java (e.g. when using JNI, nio, etc...). And furthermore - are there any suggestions how the problems can be analyzed Smile And if something needed for the analysis is missing, then - what is it?

Will be very happy if we get some thoughts on this.

Regards,
Krum
Previous Topic:Perm gem space taken by classloader or class definition
Next Topic:Getting heap dump using JDK 1.5
Goto Forum:
  


Current Time: Thu Apr 25 19:56:21 GMT 2024

Powered by FUDForum. Page generated in 0.02988 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top