Tips and Tricks

The following tips and tricks give some helpful ideas for increasing your productivity and ease the work with Memory Analyzer.

Tip Description
Shortcuts. Use command instead of ctrl on macOS

ctrl+Q - Opens the Query Browser.

ctrl+H - Opens the history of executed queries.

ctrl+page-down - Next tab.

ctrl+page-up - Previous tab.

shift+F10 - Context menu for results of queries.

ctrl+F10 - Context menu for editor tabs - to close and rearrange.

ctrl+shift+P - Reset perspective.

alt+I - Opens a pop-up menu that explains the icons.

ctrl+shift+L - Opens a pop-up menu that explains the keyboard shortcuts.

Quick Search 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.
Histogram pane with user having typed jav showing all the lines containing jav highlighted.

Filter 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.

For text columns a regular expression is used as a filter.

For numeric columns a numeric comparison is used as a filter. Use one of the following:
  • Intervals: 1000..10000 1%..10%
  • Upper Boundary: <=10000 <1%
  • Lower Boundary: >1000 >=5%
  • Equality: 1000 5% NaN
  • Inequality: !=1000 <>5% !=NaN
    Restriction: Experimental
  • Complement of interval: !1000..10000 !1%..10% (all values including NaN except those in the interval [logical negation of range])
    Restriction: Experimental
  • Complement of interval: U\1000..10000 U\1%..10% (all values excluding NaN except those in the interval [universal set difference from range])
    Restriction: Experimental

Histogram result with filter entries circled.

To move between columns of the filter row, click on the required cell, or once one cell is selected move to others with tab or shift+tab. Use esc to cancel or enter to finish modifying the filters, or click on another row to continue to work with the tree or table, or use ctrl+tab or command+tab to navigate another pane. tab or shift+tab will then revert to normal navigation.
Resize and reorder columns To resize or rearrange columns using the keyboard select a filter entry for the column as above.
  • Use ctrl or command up and down cursor keys to resize the column.
  • Use shift up and down cursor keys to change the position of the column.
  • Use use ctrl or command numpad plus when not in edit filter mode to expand columns to full width.
Keyboard navigation of trees
  • Use numpad-plus or enter to expand a row.
  • Use shift+numpad-plus to expand selected rows by one level.
  • Use numpad-minus or enter to collapse a row.
  • Use numpad-multiply to fully expand a row and its descendants. Use escape to cancel further expansion.
  • Use numpad-divide to fully collapse all selected rows and their descendants.
Undo/redo in Notes View, OQL Pane There is undo/redo using ctrl+Z / ctrl+Y in the Notes View and the OQL Pane. The navigator pane can also be used to retrieve previous OQL statements.
Copy To Clipboard Use ctrl+C to copy the selection to the clipboard. The data will keep its structure:
Text table as result of copy to clipboard.

Manage the history of opened heap dumps Heap Dump History view offers a set of context menu actions to manage the history of opened heap dumps:
Heap Dump History and context menu on a heap dump.

Delete Heap Dump action removes the heap dump from the history, but not from the file system. To find a heap dump in the file system use Explore in File System context menu action. Delete Index Files deletes the index files for a snapshot. The heap dump will be reparsed if reopened. This command could be useful to save disk space, or to reparse the heap dump with new options.

Manage editor tabs 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.
Editor tabs for heap editor showing context menu for adjusting the tab entries.

Memory Analyzer 1.11 has the menu options
  • Close
  • Close Others
  • Close Tabs to the Left
  • Close Tabs to the Right
  • Move Tab Left
  • Move Tab Right
  • Close All
To use keyboard navigation, perform the following:
  1. Use tab key to move to the tab bar
  2. Use
    • left-arrow
    • right-arrow
    to select a tab
  3. Use ctrl+F10 to bring up the context menu
  4. Use
    • Move Tab Left or the L key
    • Move Tab Right or the R key
    to move the tab.

Editor tab context menu showing move tab left and move tab right.

Link Inspector View with Heap Editor 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 Link with Snapshot context menu. The Inspector view will keep its data. To have another Inspector view, open it via View > Inspector
Object Inspector View and link to snapshot button.

Attribute tab in Inspector View The Object Inspector View shows the details for the single selected object. The attribute tab shows the fields of an object or array elements for an array.
Type
The type of the field or array element.
  • byte
  • short
  • int
  • long
  • boolean
  • char
  • float
  • double
  • ref - an object reference
Name
The name of the field or the array element index.
Value
The value of the field or array element. Blank for PHD snapshots as the snapshot does not have field names or the value of primitive arrays.
As IBM Portable Heap Dump (PHD) files do not contain primitive array contents the value column for array elements is blank. As IBM Portable Heap Dump (PHD) files do not contain field names the attribute tab is blank for plain objects. Outbound references are shown by the list objects query.
Value tab in Inspector View The Object Inspector View shows the details for the single selected object. The value tab shows the value as given by the name resolver extension point.
Value tab for object inspector showing the value of a string.

Image and Color objects 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.

SWT image shown at the bottom of the inspector view. SWT color shown at the bottom of the inspector view.

Class Hierarchy in Inspector The inspector now displays the full class hierarchy of any selected object. One can drill-down via context menus.
Class hierarchy show a a tree.

Context menu for totals row 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 ctrl+A, 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.
Context menu for totals row showing Total: 27 of 2,036 entries; 2,009 more

OQL autocompletion The Object Query Language (OQL) pane has syntax highlighting for OQL keywords. It also offers suggestions for class names for the SELECT FROM clause, both simple class names and regular expressions. The class name list is brought up on typing a dot '.'. ctrl+space can also be used to bring up the list.
OQL completion showing a list of possible classes.

The regular expression list appears on typing a double-quote '"'.
OQL completion showing a list of possible classes via a regular expression.

Autocompletion for SELECT and WHERE clauses can also supply field names. The class for the field names is selected in the FROM 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.
select s. from java.util.ArrayList java.util.ArrayList

Suggestions are then provided in the SELECT or WHERE clauses on typing '.' or '@' or ctrl+space.

Attributes begin with '@' and the autocompletion is filtered based on what has been typed so far.

In SELECT and WHERE clauses there are also suggestions for methods on key Memory Analyzer objects representing contents of the snapshot.

Pressing enter adds the selected text to the command window.
OQL windows showing select s,${snapshot}/getImmediateDominators(int1) from java.util.ArrayList s