| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE html |
| PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us"> |
| <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| |
| <meta name="generator" content="DITA-OT" /><meta name="DC.type" content="reference" /> |
| <meta name="DC.title" content="Tips and Tricks" /> |
| <meta name="abstract" content="" /> |
| <meta name="description" content="" /> |
| <meta name="copyright" content="Copyright (c) 2008, 2023 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/ " type="primary" /> |
| <meta name="DC.rights.owner" content="Copyright (c) 2008, 2023 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/ " type="primary" /> |
| <meta name="DC.format" content="XHTML" /> |
| <meta name="DC.identifier" content="ref_tips" /> |
| <meta name="DC.language" content="en-us" /> |
| <link rel="stylesheet" type="text/css" href="../styles/commonltr.css" /> |
| <title>Tips and Tricks</title> |
| </head> |
| <body id="ref_tips"> |
| |
| <h1 class="title topictitle1" id="ariaid-title1">Tips and Tricks</h1> |
| |
| |
| |
| |
| <div class="body refbody"><p class="shortdesc"></p> |
| |
| <div class="section"> |
| <p class="p"> The following tips and tricks give some helpful ideas for |
| increasing your productivity and ease the work with Memory Analyzer. |
| </p> |
| |
| <table cellpadding="4" cellspacing="0" summary="" id="ref_tips__tips_table" border="1" class="simpletable"><col style="width:20%" /><col style="width:80%" /><thead><tr class="sthead"> |
| <th style="vertical-align:bottom;text-align:left;" id="d8327e37" class="stentry">Tip</th> |
| |
| <th style="vertical-align:bottom;text-align:left;" id="d8327e40" class="stentry">Description</th> |
| |
| </tr> |
| </thead><tbody><tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Shortcuts. Use <span class="ph uicontrol">command</span> instead of <span class="ph uicontrol">ctrl</span> on macOS</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="stentry"> |
| <p class="p"><span class="ph uicontrol">ctrl+Q</span> - Opens the Query Browser.</p> |
| |
| <p class="p"><span class="ph uicontrol">ctrl+H</span> - Opens the history of executed queries.</p> |
| |
| <p class="p"><span class="ph uicontrol">ctrl+page-down</span> - Next tab.</p> |
| |
| <p class="p"><span class="ph uicontrol">ctrl+page-up</span> - Previous tab.</p> |
| |
| <p class="p"><span class="ph uicontrol">shift+F10</span> - Context menu for results of queries.</p> |
| |
| <p class="p"><span class="ph uicontrol">ctrl+F10</span> - Context menu for editor tabs - to close and rearrange.</p> |
| |
| <p class="p"><span class="ph uicontrol">ctrl+shift+P</span> - Reset perspective.</p> |
| |
| <p class="p"><span class="ph uicontrol">alt+I</span> - Opens a pop-up menu that explains the icons.</p> |
| |
| <p class="p"><span class="ph uicontrol">ctrl+shift+L</span> - Opens a pop-up menu that explains the keyboard shortcuts.</p> |
| |
| |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Quick Search</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="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. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/m65d10c7b.png" alt="Histogram pane with user having typed jav showing all the lines containing jav highlighted." /></div><br /> |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Filter</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="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 class="p"> |
| For text columns a regular expression is used as a filter. |
| </p> |
| |
| <div class="p"> |
| For numeric columns a numeric comparison is used as a filter. |
| Use one of the following: |
| <ul class="ul"> |
| <li class="li">Intervals: <kbd class="ph userinput">1000..10000</kbd> <kbd class="ph userinput">1%..10%</kbd></li> |
| |
| <li class="li">Upper Boundary: <kbd class="ph userinput"><=10000</kbd> <kbd class="ph userinput"><1%</kbd></li> |
| |
| <li class="li">Lower Boundary: <kbd class="ph userinput">>1000</kbd> <kbd class="ph userinput">>=5%</kbd></li> |
| |
| <li class="li">Equality: <kbd class="ph userinput">1000</kbd> <kbd class="ph userinput">5%</kbd> <kbd class="ph userinput">NaN</kbd> <kbd class="ph userinput">∞</kbd></li> |
| |
| <li class="li">Inequality: <kbd class="ph userinput">!=1000 <>5%</kbd> <kbd class="ph userinput">!=NaN</kbd><div class="note restriction"><span class="restrictiontitle">Restriction:</span> Experimental</div> |
| </li> |
| |
| <li class="li">Complement of interval: <kbd class="ph userinput">!1000..10000</kbd> <kbd class="ph userinput">!1%..10%</kbd> (all values including NaN except those in the interval [logical negation of range])<div class="note restriction"><span class="restrictiontitle">Restriction:</span> Experimental</div> |
| </li> |
| |
| <li class="li">Complement of interval: U\1000..10000 U\1%..10% (all values excluding NaN except those in the interval [universal set difference from range])<div class="note restriction"><span class="restrictiontitle">Restriction:</span> Experimental</div> |
| </li> |
| |
| </ul> |
| |
| </div> |
| |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/filter.png" /></div><br /> |
| To move between columns of the filter row, click on the required cell, or once one cell |
| is selected move to others with <span class="ph uicontrol">tab</span> or <span class="ph uicontrol">shift+tab</span>. |
| Use <span class="ph uicontrol">esc</span> to cancel or <span class="ph uicontrol">enter</span> to finish modifying the filters, or click on another row to continue to work |
| with the tree or table, or use |
| <span class="ph uicontrol">ctrl+tab</span> or <span class="ph uicontrol">command+tab</span> to navigate another pane. |
| <span class="ph uicontrol">tab</span> or <span class="ph uicontrol">shift+tab</span> will then revert to normal navigation. |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Resize and reorder columns</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="stentry"> |
| To resize or rearrange columns using the keyboard select a filter entry |
| for the column as above. |
| <ul class="ul"> |
| <li class="li">Use <span class="ph uicontrol">ctrl</span> or <span class="ph uicontrol">command</span> |
| up and down cursor keys to resize the column.</li> |
| |
| <li class="li">Use <span class="ph uicontrol">shift</span> up and down cursor keys to change the position of the column.</li> |
| |
| <li class="li">Use use <span class="ph uicontrol">ctrl</span> or <span class="ph uicontrol">command</span> <span class="ph uicontrol">numpad plus</span> when not in edit filter mode to expand |
| columns to full width.</li> |
| |
| </ul> |
| |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Keyboard navigation of trees</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="stentry"> |
| <ul class="ul"> |
| <li class="li">Use <span class="ph uicontrol">numpad-plus</span> or <span class="ph uicontrol">enter</span> to expand a row.</li> |
| |
| <li class="li">Use <span class="ph uicontrol">shift+numpad-plus</span> to expand selected rows by one level.</li> |
| |
| <li class="li">Use <span class="ph uicontrol">numpad-minus</span> or <span class="ph uicontrol">enter</span> to collapse a row.</li> |
| |
| <li class="li">Use <span class="ph uicontrol">numpad-multiply</span> to fully expand a row and its descendants. Use <span class="ph uicontrol">escape</span> to cancel further expansion.</li> |
| |
| <li class="li">Use <span class="ph uicontrol">numpad-divide</span> to fully collapse all selected rows and their descendants.</li> |
| |
| </ul> |
| |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Notes, Hyperlinks in Notes View</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="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 <span class="ph uicontrol">control</span> key |
| and a mouse click (or <span class="ph uicontrol">command</span> + click). |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/m4d2fff8d.png" /></div><br /> |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Undo/redo in Notes View, OQL Pane</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="stentry"> |
| There is undo/redo using <span class="ph uicontrol">ctrl+Z</span> / <span class="ph uicontrol">ctrl+Y</span> in the Notes View and |
| the OQL Pane. The navigator pane can also be used to retrieve |
| previous OQL statements. |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Copy To Clipboard</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="stentry"> |
| Use <span class="ph uicontrol">ctrl+C</span> to copy the selection to the clipboard. The data will |
| keep its structure: |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/1af34c1.png" /></div><br /> |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry"> Manage the history of opened heap dumps</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="stentry"> |
| Heap Dump History view offers a set of context menu actions to |
| manage the history of opened heap dumps: |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/691a2594.png" /></div><br /> |
| <p class="p"> |
| <span class="ph uicontrol">Delete Heap Dump</span>> |
| action removes the heap dump from the history, but not from the |
| file system. To find a heap dump in the file system use |
| <span class="ph uicontrol">Explore in File System</span>> |
| context menu action |
| </p> |
| |
| </td> |
| |
| </tr> |
| <tr id="ref_tips__editor_tabs" class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Manage editor tabs</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="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. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/7df38219.png" /></div><br /> |
| Memory Analyzer 1.11 has the menu options |
| <ul class="ul"> |
| <li class="li"><span class="ph uicontrol">Close</span></li> |
| |
| <li class="li"><span class="ph uicontrol">Close Others</span></li> |
| |
| <li class="li"><span class="ph uicontrol">Close Tabs to the Left</span></li> |
| |
| <li class="li"><span class="ph uicontrol">Close Tabs to the Right</span></li> |
| |
| <li class="li"><span class="ph uicontrol">Move Tab <span class="keyword shortcut">L</span>eft</span></li> |
| |
| <li class="li"><span class="ph uicontrol">Move Tab <span class="keyword shortcut">R</span>ight</span></li> |
| |
| <li class="li"><span class="ph uicontrol">Close All</span></li> |
| |
| </ul> |
| |
| To use keyboard navigation, perform the following: |
| <ol class="ol"> |
| <li class="li">Use <span class="ph uicontrol">tab</span> key |
| to move to the tab bar</li> |
| |
| <li class="li">Use |
| <ul class="ul"> |
| <li class="li"><span class="ph uicontrol">left-arrow</span></li> |
| |
| <li class="li"><span class="ph uicontrol">right-arrow</span></li> |
| |
| </ul> |
| |
| to select a tab</li> |
| |
| <li class="li">Use <span class="ph uicontrol">ctrl+F10</span> to bring up the context menu</li> |
| |
| <li class="li">Use |
| <ul class="ul"> |
| <li class="li"><span class="ph menucascade"><span class="ph uicontrol">Move Tab <span class="keyword shortcut">L</span>eft</span></span> or the <span class="ph uicontrol">L</span> key</li> |
| |
| <li class="li"><span class="ph menucascade"><span class="ph uicontrol">Move Tab <span class="keyword shortcut">R</span>ight</span></span> or the <span class="ph uicontrol">R</span> key</li> |
| |
| </ul> |
| |
| to move the tab.</li> |
| |
| </ol> |
| |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/movetab.png" height="153" width="244" /></div><br /> |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry"> Link Inspector View with Heap Editor</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="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 |
| <span class="keyword cmdname">Link with Snapshot</span> |
| context menu. The Inspector view will keep its data. To have |
| another Inspector view, open it via |
| <span class="ph menucascade"><span class="ph uicontrol">View</span><abbr title="and then"> > </abbr><span class="ph uicontrol">Inspector</span></span> |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/link_with_snapshot.png" /></div><br /> |
| </td> |
| |
| </tr> |
| <tr id="ref_tips__attribute_tab" class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Attribute tab in Inspector View</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="stentry"> |
| 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. |
| <dl class="dl"> |
| |
| <dt class="dt dlterm">Type</dt> |
| |
| <dd class="dd">The type of the field or array element. |
| <ul class="ul"> |
| <li class="li">byte</li> |
| |
| <li class="li">short</li> |
| |
| <li class="li">int</li> |
| |
| <li class="li">long</li> |
| |
| <li class="li">boolean</li> |
| |
| <li class="li">char</li> |
| |
| <li class="li">float</li> |
| |
| <li class="li">double</li> |
| |
| <li class="li">ref - an object reference</li> |
| |
| </ul> |
| |
| </dd> |
| |
| |
| |
| <dt class="dt dlterm">Name</dt> |
| |
| <dd class="dd">The name of the field or the array element index.</dd> |
| |
| |
| |
| <dt class="dt dlterm">Value</dt> |
| |
| <dd class="dd">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.</dd> |
| |
| |
| </dl> |
| |
| 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 <a class="xref" href="querymatrix.html#ref_querymatrix__list_objects">list objects</a> query. |
| </td> |
| |
| </tr> |
| <tr id="ref_tips__value_tab" class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Value tab in Inspector View</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="stentry"> |
| The Object Inspector View shows the details for the single selected |
| object. The value tab shows the value as given by the |
| <a class="xref" href="../doc/org_eclipse_mat_api_nameResolver.html"> |
| name resolver</a> extension point. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/inspector_value.png" /></div><br /> |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Image and Color objects</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="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 class="p"> |
| <img class="image" src="../mimes/nn_inspector_imagedata.png" /> |
| <img class="image" src="../mimes/nn_inspector_rgb.png" /> |
| </p> |
| |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Class Hierarchy in Inspector</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="stentry"> |
| The inspector now displays the full class hierarchy of any selected object. |
| One can drill-down via context menus. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/nn_inspector_class_hierarchy.png" /></div><br /> |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Context menu for totals row</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="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 <span class="ph uicontrol">ctrl+A</span>, |
| 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. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/totals_menu.png" /></div><br /> |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" id="ref_tips__oqlcompletion" headers="d8327e37" class="stentry">OQL autocompletion</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="stentry"> |
| The Object Query Language (OQL) pane has syntax highlighting for OQL |
| keywords. It also offers suggestions for class names for the |
| <span class="keyword">SELECT</span> <span class="keyword">FROM</span> clause, both simple class names and regular expressions. |
| The class name list is brought up on typing a dot '.'. <span class="ph uicontrol">ctrl+space</span> |
| can also be used to bring up the list. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/oql_completion1.png" /></div><br /> |
| The regular expression list appears on typing a double-quote '"'. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/oql_completion2.png" /></div><br /> |
| Autocompletion |
| for <span class="keyword">SELECT</span> and <span class="keyword">WHERE</span> clauses |
| can also supply field names. The class |
| for the field names is selected in the <span class="keyword">FROM</span> 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. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/oql_completion3.png" alt="select s from java.util.ArrayList java.util.ArrayList" /></div><br /> |
| Suggestions are then provided in the <span class="keyword">SELECT</span> or |
| <span class="keyword">WHERE</span> clauses on typing '<kbd class="ph userinput">.</kbd>' or '<kbd class="ph userinput">@</kbd>' or <span class="ph uicontrol">ctrl+space</span>. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/oql_completion4.png" /></div><br /> |
| Attributes begin with '@' and the autocompletion is filtered based on |
| what has been typed so far. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/oql_completion5.png" /></div><br /> |
| In <span class="keyword">SELECT</span> and <span class="keyword">WHERE</span> clauses there are also suggestions for methods on |
| key Memory Analyzer objects representing contents of the snapshot. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/oql_completion6.png" /></div><br /> |
| Pressing enter adds the selected text to the command window. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/oql_completion7.png" /></div><br /> |
| </td> |
| |
| </tr> |
| <tr id="ref_tips__piechartlinks" class="strow"> |
| <td style="vertical-align:top;" headers="d8327e37" class="stentry">Links in Pie Chart Image</td> |
| |
| <td style="vertical-align:top;" headers="d8327e40" class="stentry"> |
| Memory Analyzer 1.11 adds hot-spots to the pie chart. |
| The legend entries now link to the referenced object. |
| <br /><div class="imageleft"><img class="image imageleft" src="../mimes/piechartlinks.png" height="292" width="809" alt="Pie Chart showing links from legend" /></div><br /> |
| </td> |
| |
| </tr> |
| </tbody></table> |
| |
| </div> |
| |
| </div> |
| |
| </body> |
| </html> |