blob: 2362ab155134c3483c9a940f95d3344b1b71fe99 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2008, 2021 SAP AG and IBM Corporation.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Contributors:
SAP AG - initial API and implementation
IBM Corporation - updates for value tab, OQL etc.
-->
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd" >
<reference id="ref_tips" xml:lang="en-us">
<title>Tips and Tricks</title>
<shortdesc />
<prolog>
<copyright>
<copyryear year=""></copyryear>
<copyrholder>
Copyright (c) 2008, 2021 SAP AG, IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
</copyrholder>
</copyright>
</prolog>
<refbody>
<section>
<p> The following tips and tricks give some helpful ideas for
increasing your productivity and ease the work with Memory Analyzer.
</p>
<simpletable relcolwidth="1* 4*" id="tips_table">
<sthead>
<stentry>Tip</stentry>
<stentry>Description</stentry>
</sthead>
<strow>
<stentry>Shortcuts. Use <uicontrol>command</uicontrol> instead of <uicontrol>ctrl</uicontrol> on macOS</stentry>
<stentry>
<p><uicontrol>ctrl+Q</uicontrol> - Opens the Query Browser.</p>
<p><uicontrol>ctrl+H</uicontrol> - Opens the history of executed queries.</p>
<p><uicontrol>ctrl+page-down</uicontrol> - Next tab.</p>
<p><uicontrol>ctrl+page-up</uicontrol> - Previous tab.</p>
<p><uicontrol>shift+F10</uicontrol> - Context menu for results of queries.</p>
<p><uicontrol>ctrl+F10</uicontrol> - Context menu for editor tabs - to close and rearrange.</p>
<p><uicontrol>ctrl+shift+P</uicontrol> - Reset perspective.</p>
<p><uicontrol>alt+I</uicontrol> - Opens a pop-up menu that explains the icons.</p>
<p><uicontrol>ctrl+shift+L</uicontrol> - Opens a pop-up menu that explains the keyboard shortcuts.</p>
</stentry>
</strow>
<strow>
<stentry>Quick Search</stentry>
<stentry>
Just start to type while you are in the heap editor, all the
matches will be highlighted. This quick search starts is activated
when 3 or more letters are provided.
<image href="../mimes/m65d10c7b.png" align="left" placement="break">
<alt>Histogram pane with user having typed
<userinput>jav</userinput> showing all the lines
containing <userinput>jav</userinput> highlighted.
</alt>
</image>
</stentry>
</strow>
<strow>
<stentry>Filter</stentry>
<stentry>
To show only rows of a table or tree matching a filter,
click the top row, or press enter when the top row is selected.
Then type the required filter for the column. Multiple filters can be used.
In the example the "(1,909 filtered)" on the totals row means 1909 rows have been excluded by the filter.
<p>
For text columns a regular expression is used as a filter.
</p>
<p>
For numeric columns a numeric comparison is used as a filter.
Use one of the following:
<ul>
<li>Intervals: <userinput>1000..10000</userinput> <userinput>1%..10%</userinput></li>
<li>Upper Boundary: <userinput>&lt;=10000</userinput> <userinput>&lt;1%</userinput></li>
<li>Lower Boundary: <userinput>&gt;1000</userinput> <userinput>&gt;=5%</userinput></li>
<li>Equality: <userinput>1000</userinput> <userinput>5%</userinput> <userinput>NaN</userinput> <userinput>&#8734;</userinput></li>
<li>Inequality: <userinput>!=1000 &lt;&gt;5%</userinput> <userinput>!=NaN</userinput><note type="restriction">Experimental</note></li>
<li>Complement of interval: <userinput>!1000..10000</userinput> <userinput>!1%..10%</userinput> (all values including NaN except those in the interval [logical negation of range])<note type="restriction">Experimental</note></li>
<li>Complement of interval: U\1000..10000 U\1%..10% (all values excluding NaN except those in the interval [universal set difference from range])<note type="restriction">Experimental</note></li>
</ul>
</p>
<image href="../mimes/filter.png" align="left" placement="break" />
To move between columns of the filter row, click on the required cell, or once one cell
is selected move to others with <uicontrol>tab</uicontrol> or <uicontrol>shift+tab</uicontrol>.
Use <uicontrol>esc</uicontrol> to cancel or <uicontrol>enter</uicontrol> to finish modifying the filters, or click on another row to continue to work
with the tree or table, or use
<uicontrol>ctrl+tab</uicontrol> or <uicontrol>command+tab</uicontrol> to navigate another pane.
<uicontrol>tab</uicontrol> or <uicontrol>shift+tab</uicontrol> will then revert to normal navigation.
</stentry>
</strow>
<strow>
<stentry>Resize and reorder columns</stentry>
<stentry>
To resize or rearrange columns using the keyboard select a filter entry
for the column as above.
<ul>
<li>Use <uicontrol>ctrl</uicontrol> or <uicontrol>command</uicontrol>
up and down cursor keys to resize the column.</li>
<li>Use <uicontrol>shift</uicontrol> up and down cursor keys to change the position of the column.</li>
<li>Use use <uicontrol>ctrl</uicontrol> or <uicontrol>command</uicontrol> <uicontrol>numpad plus</uicontrol> when not in edit filter mode to expand
columns to full width.</li>
</ul>
</stentry>
</strow>
<strow>
<stentry>Keyboard navigation of trees</stentry>
<stentry>
<ul>
<li>Use <uicontrol>numpad-plus</uicontrol> or <uicontrol>enter</uicontrol> to expand a row.</li>
<li>Use <uicontrol>shift+numpad-plus</uicontrol> to expand selected rows by one level.</li>
<li>Use <uicontrol>numpad-minus</uicontrol> or <uicontrol>enter</uicontrol> to collapse a row.</li>
<li>Use <uicontrol>numpad-multiply</uicontrol> to fully expand a row and its descendants. Use <uicontrol>escape</uicontrol> to cancel further expansion.</li>
<li>Use <uicontrol>numpad-divide</uicontrol> to fully collapse all selected rows and their descendants.</li>
</ul>
</stentry>
</strow>
<strow>
<stentry>Notes, Hyperlinks in Notes View</stentry>
<stentry>
Notes View recognizes and highlights object addresses. Activating
the hyperlink brings up a context menu which contains actions for
this particular object. Activate the hyperlink using the <uicontrol>control</uicontrol> key
and a mouse click (or <uicontrol>command</uicontrol> + click).
<image href="../mimes/m4d2fff8d.png" align="left" placement="break" />
</stentry>
</strow>
<strow>
<stentry>Undo/redo in Notes View, OQL Pane</stentry>
<stentry>
There is undo/redo using <uicontrol>ctrl+Z</uicontrol> / <uicontrol>ctrl+Y</uicontrol> in the Notes View and
the OQL Pane. The navigator pane can also be used to retrieve
previous OQL statements.
</stentry>
</strow>
<strow>
<stentry>Copy To Clipboard</stentry>
<stentry>
Use <uicontrol>ctrl+C</uicontrol> to copy the selection to the clipboard. The data will
keep its structure:
<image href="../mimes/1af34c1.png" align="left" placement="break" />
</stentry>
</strow>
<strow>
<stentry> Manage the history of opened heap dumps</stentry>
<stentry>
Heap Dump History view offers a set of context menu actions to
manage the history of opened heap dumps:
<image href="../mimes/691a2594.png" align="left" placement="break" />
<p>
<uicontrol>Delete Heap Dump</uicontrol>>
action removes the heap dump from the history, but not from the
file system. To find a heap dump in the file system use
<uicontrol>Explore in File System</uicontrol>>
context menu action
</p>
</stentry>
</strow>
<strow id="editor_tabs">
<stentry>Manage editor tabs</stentry>
<stentry>
Right click on the Heap Editor tab will open a context menu to
manage the tabs. It might be very helpful when many tabs are open.
<image href="../mimes/7df38219.png" align="left" placement="break" />
Memory Analyzer 1.11 has the menu options
<ul>
<li><uicontrol>Close</uicontrol></li>
<li><uicontrol>Close Others</uicontrol></li>
<li><uicontrol>Close Tabs to the Left</uicontrol></li>
<li><uicontrol>Close Tabs to the Right</uicontrol></li>
<li><uicontrol>Move Tab <shortcut>L</shortcut>eft</uicontrol></li>
<li><uicontrol>Move Tab <shortcut>R</shortcut>ight</uicontrol></li>
<li><uicontrol>Close All</uicontrol></li>
</ul>
To use keyboard navigation, perform the following:
<ol>
<li>Use <uicontrol>tab</uicontrol> key
to move to the tab bar</li>
<li>Use
<ul>
<li><uicontrol>left-arrow</uicontrol></li>
<li><uicontrol>right-arrow</uicontrol></li>
</ul>
to select a tab</li>
<li>Use <uicontrol>ctrl+F10</uicontrol> to bring up the context menu</li>
<li>Use
<ul>
<li><menucascade><uicontrol>Move Tab <shortcut>L</shortcut>eft</uicontrol></menucascade> or the <uicontrol>L</uicontrol> key</li>
<li><menucascade><uicontrol>Move Tab <shortcut>R</shortcut>ight</uicontrol></menucascade> or the <uicontrol>R</uicontrol> key</li>
</ul>
to move the tab.</li>
</ol>
<image href="../mimes/movetab.png" align="left" placement="break" scale="60" />
</stentry>
</strow>
<strow>
<stentry> Link Inspector View with Heap Editor</stentry>
<stentry>
Object Inspector View shows the details for the single selected
object. The view updates itself with every change in the
selection. Sometimes it is interesting to compare two or more
objects or just to capture the view. To do so use
<cmdname>Link with Snapshot</cmdname>
context menu. The Inspector view will keep its data. To have
another Inspector view, open it via
<menucascade>
<uicontrol>View</uicontrol>
<uicontrol>Inspector</uicontrol>
</menucascade>
<image href="../mimes/link_with_snapshot.png" align="left" placement="break" />
</stentry>
</strow>
<strow id="value_tab">
<stentry>Value tab in Inspector View</stentry>
<stentry>
The Object Inspector View shows the details for the single selected
object. The value tab shows the value as given by the
<xref href="../doc/org_eclipse_mat_api_nameResolver.html" format="html">
name resolver</xref> extension point.
<image href="../mimes/inspector_value.png" align="left" placement="break" />
</stentry>
</strow>
<strow>
<stentry>Image and Color objects</stentry>
<stentry>
The Object Inspector View
recreates Eclipse colors and images from the information in the heap dump and
displays the information in the lower left corner of the inspector.
<p>
<image href="../mimes/nn_inspector_imagedata.png" />
<image href="../mimes/nn_inspector_rgb.png" />
</p>
</stentry>
</strow>
<strow>
<stentry>Class Hierarchy in Inspector</stentry>
<stentry>
The inspector now displays the full class hierarchy of any selected object.
One can drill-down via context menus.
<image href="../mimes/nn_inspector_class_hierarchy.png" align="left" placement="break" />
</stentry>
</strow>
<strow>
<stentry>Context menu for totals row</stentry>
<stentry>
The totals row now represents all the additional entries in a tree or table.
If the totals row is selected then the context menu will operate on all the unshown
entries in the tree or table. If all the rows are selected, for example using <uicontrol>ctrl+A</uicontrol>,
then the displayed rows are selected and the totals row is selected and then
the context menu will operate on all the entries in the tree and table.
Filtering operates as normal, and the rows excluded by the filter are not part of
the entries obtained by selecting the totals row.
<image href="../mimes/totals_menu.png" align="left" placement="break" />
</stentry>
</strow>
<strow>
<stentry id="oqlcompletion">OQL autocompletion</stentry>
<stentry>
The Object Query Language (OQL) pane has syntax highlighting for OQL
keywords. It also offers suggestions for class names for the
<keyword>SELECT</keyword> <keyword>FROM</keyword> clause, both simple class names and regular expressions.
The class name list is brought up on typing a dot '.'. <uicontrol>ctrl+space</uicontrol>
can also be used to bring up the list.
<image href="../mimes/oql_completion1.png" align="left" placement="break" />
The regular expression list appears on typing a double-quote '"'.
<image href="../mimes/oql_completion2.png" align="left" placement="break" />
Autocompletion
for <keyword>SELECT</keyword> and <keyword>WHERE</keyword> clauses
can also supply field names. The class
for the field names is selected in the <keyword>FROM</keyword> clause by typing space
after the class name. This brings up a context information box, and
selects that class as the active class for field names.
<image href="../mimes/oql_completion3.png" align="left" placement="break">
<alt><userinput>select s from java.util.ArrayList</userinput>
<systemoutput>java.util.ArrayList</systemoutput>
</alt>
</image>
Suggestions are then provided in the <keyword>SELECT</keyword> or
<keyword>WHERE</keyword> clauses on typing '<userinput>.</userinput>' or '<userinput>@</userinput>' or <uicontrol>ctrl+space</uicontrol>.
<image href="../mimes/oql_completion4.png" align="left" placement="break">
</image>
Attributes begin with '@' and the autocompletion is filtered based on
what has been typed so far.
<image href="../mimes/oql_completion5.png" align="left" placement="break">
</image>
In <keyword>SELECT</keyword> and <keyword>WHERE</keyword> clauses there are also suggestions for methods on
key Memory Analyzer objects representing contents of the snapshot.
<image href="../mimes/oql_completion6.png" align="left" placement="break">
</image>
Pressing enter adds the selected text to the command window.
<image href="../mimes/oql_completion7.png" align="left" placement="break">
</image>
</stentry>
</strow>
<strow id="piechartlinks">
<stentry>Links in Pie Chart Image</stentry>
<stentry>
Memory Analyzer 1.11 adds hot-spots to the pie chart.
The legend entries now link to the referenced object.
<image href="../mimes/piechartlinks.png" align="left" placement="break" scale="50">
<alt>Pie Chart showing links from legend</alt>
</image>
</stentry>
</strow>
</simpletable>
</section>
</refbody>
</reference>