Bug 568201 - Integrate Memory Analyzer in JDT
Summary: Integrate Memory Analyzer in JDT
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.18   Edit
Hardware: PC All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2020-10-24 12:21 EDT by Andrew Johnson CLA
Modified: 2020-12-09 04:01 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Johnson CLA 2020-10-24 12:21:30 EDT
Eclipse Memory Analyzer is a separate project analyzing Java OutOfMemoryErrors off-line using heap dumps.

It has very limited integration with JDT - clicking on a class in MAT gives an option 'Open Source File' which then links to the Java source file in JDK.

Perhaps JDK and MAT could be better integrated.
E.g. trigger heap dump from JDT debug view, give choice to trigger a heap dump when an OOM occurs. Add a link back from MAT view of an object to a debug/live view of an object (if it hasn't moved).

If MAT was also packaged as part of the Eclipse Java IDE or Java EE IDE or RCP IDE then that could be more convenient - though we would need to check MAT did not use resources when not needed e.g. should not start any bundles until required.

Any thoughts?
Comment 1 Sarika Sinha CLA 2020-10-27 01:26:19 EDT
This is a good idea to investigate. 
@Andrew,
Will you like to do some further investigation as we don't have resource to work on this.
Comment 2 Andrew Johnson CLA 2020-10-28 18:18:29 EDT
I don't think I'll have much time for this either, but I've slightly improved the link from stack frames in MAT to the class file source: bug 560217 and the choice of VMs to configure the acquire heap dump option. MAT needs a helper VM to provide jps/jmap or can use a separate JVM to do late attach, and now MAT can use the JDT list of VMs for this. Bug 568352. MAT does its own list of running VMs to acquire heap dumps from, which is separate from the JDT debug list as MAT could examine any running VM on the machine, not just those controlled by the Eclipse IDE. I'm using org.eclipse.jdt.launching.PREF_VM_XML to get the list of VMs - probably not JDT API, but MAT will handle this being missing.
Comment 3 Andrew Johnson CLA 2020-12-09 04:01:03 EST
In comment 2: bug 568217 not 560217