Skip to content

Commit

Permalink
561460: More comparison queries
Browse files Browse the repository at this point in the history
Help and a cheat sheet

Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=561460

Change-Id: I8990c187dc9b4aacdef60105a6100e5629362b8d
  • Loading branch information
ajohnson1 committed Mar 29, 2020
1 parent 763b53f commit 353e4b6
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

@CommandName("leakhunter")
@Icon("/META-INF/icons/leak.gif")
@HelpUrl("/org.eclipse.mat.ui.help/tasks/runningleaksuspectsreport.html")
@HelpUrl("/org.eclipse.mat.ui.help/tasks/runningleaksuspectreport.html")
public class LeakHunterQuery implements IQuery
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
@CommandName("leakhunter2")
@Icon("/META-INF/icons/leak.gif")
@HelpUrl("/org.eclipse.mat.ui.help/tasks/runningleaksuspectsreport.html")
@HelpUrl("/org.eclipse.mat.ui.help/tasks/runningleaksuspectreport.html")
public class LeakHunterQuery2 extends LeakHunterQuery
{

Expand Down
3 changes: 3 additions & 0 deletions plugins/org.eclipse.mat.ui.help/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ cheatsheet.best.name = Best Features Tutorial
cheatsheet.best.description = A guide to learning about some of the best features of Memory Analyzer.
cheatsheet.finding.name = Finding Memory Problems Tutorial
cheatsheet.finding.description = Learn how to track down memory leaks.
cheatsheet.acquire.name = Acquire and Compare Heap Dumps
cheatsheet.acquire.description = A basic tutorial to acquiring and comparing heap dumps using Memory Analyzer.

9 changes: 9 additions & 0 deletions plugins/org.eclipse.mat.ui.help/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@
name="%cheatsheet.finding.name">
<description>%cheatsheet.finding.description</description>
</cheatsheet>

<cheatsheet
id="org.eclipse.mat.tutorials.acquire"
contentFile="$nl$/tutorials/acquire.xml"
category="org.eclipse.mat.tutorials"
composite="false"
name="%cheatsheet.acquire.name">
<description>%cheatsheet.acquire.description</description>
</cheatsheet>
</extension>

<extension point="org.eclipse.pde.core.javadoc">
Expand Down
71 changes: 71 additions & 0 deletions plugins/org.eclipse.mat.ui.help/tutorials/acquire.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2020 IBM Corporation
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
Andrew Johnson (IBM Corporation) - initial API and implementation
-->
<cheatsheet
title="Acquire and Compare Heap Dumps">
<!--
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="org.eclipse.ui.cheatsheets platform:/resource/org.eclipse.mat.ui.help/schema/cheatSheetContentFileSpec.xsd"
xmlns="org.eclipse.ui.cheatsheets"
-->
<intro>
<description>
MAT can acquire dumps from processes running on the same machine.
</description>
</intro>
<item
title="Acquire a heap dump">
<description>
The <b>File &gt; Acquire Heap Dump ...</b> menu item lists running Java processes
on the machine.
Select one of the processes, for example one with <b>Memory Analyzer</b>
in the description and click <b>Finish</b>.
If no processes appear, or fewer than expected then use the <b>Configure ...</b>
to control how processes are found.
</description>
<command
required="false"
serialization="org.eclipse.mat.ui.acquire.HeapDump"/>
</item>
<item
title="Analyze the heap dump">
<description>
Continue the analysis of the new heap dump as shown in other cheat sheets.
</description>
</item>
<item
title="Acquire a second heap dump">
<description>
The <b>File &gt; Acquire Heap Dump ...</b> menu item lists running Java processes
on the machine.
Select the same process as before, for example one with <b>Memory Analyzer</b>
in the description and click <b>Finish</b>.
If no processes appear, or fewer than expected then use the <b>Configure ...</b>
to control how processes are found.
</description>
<command
required="false"
serialization="org.eclipse.mat.ui.acquire.HeapDump"/>
</item>
<item
title="Comparing snapshots">
<description>
Use the <b>Leak Identification &gt; Compare Snapshots Leak Report</b>
to run a report comparing two snapshots.
For the baseline, chose the first snapshot generated above.
Next, click <b>Finish</b>, wait for the report to complete then
read the report.
</description>
<command
required="false"
serialization="org.eclipse.mat.ui.actions.executeInspection(org.eclipse.mat.ui.actions.executeInspection.commandName=comparison_report)"/>
</item>
</cheatsheet>

0 comments on commit 353e4b6

Please sign in to comment.