Any plans to support C++? [message #483690] |
Wed, 02 September 2009 11:34  |
Eclipse User |
|
|
|
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 #486076 is a reply to message #484977] |
Wed, 16 September 2009 05:35   |
Eclipse User |
|
|
|
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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04644 seconds