Memory Analyzer provides a set of queries to analyze a heap dump. These queries are grouped into several categories.
You can select a query out of the drop-down toolbar menu.
In the menu you can also access the list of already executed queries via the History entry. The Query Selector which can be quickly accessed with the Ctrl+Q key combination.
The Query Selector consists of an input field, where you can search for queries, below the input field you can find the history of already executed queries and below the history the list of all available queries grouped by their category. When a query is marked, a detailed description of the query is displayed at the bottom. This description contains also the information about the arguments for this query.
If a query has arguments a wizard is opened up when the query is selected. All arguments are displayed in an table, the mandatory arguments are bold. In the message area at the top information is displayed about the mandatory arguments. At the bottom the detailed description is displayed like in the query selector.
To add the arguments to a query you may use a query browser or an arguments dialog.
Mandatory arguments are in boldface. Tooltips and help infopop that are below the dialog provide argument description. Message area of the dialog itself shows information about the selected argument or an error message if you have entered a not valid value. Some queries require a set of objects as an argument. You can provide those objects using the simple or the advanced mode of the dialog. On the figure below you can see the simple mode. A set of objects is defined by a pattern.
The metacharacters that are supported by a pattern are:(, [, { ,\, ^, -, $, |, ], }, ), ?, * and +.
Pattern Syntax | Details |
---|---|
[abc] |
a, b, or c (simple class) |
[^abc] |
Any character except a, b, or c (negation) |
outbounds( object ) |
outbound referrer |
[a-zA-Z] |
a through z, or A through Z, inclusive (range) |
[a-d[m-p]] |
a through d, or m through p: [a-dm-p] (union) |
[a-z&&[def]] |
d, e, or f (intersection) |
[a-z&&[^bc]] |
a through z, except for b and c: [ad-z] (subtraction) |
[a-z&&[^m-p]] |
a through z, and not m through p: [a-lq-z] (subtraction) |
\d |
A digit: [0-9] |
\D |
A non-digit: [^0-9] |
\s |
A whitespace character: [ \t\n\x0B\f\r] |
\S |
A non-whitespace character: [^\s] |
\w |
A word character: [a-zA-Z_0-9] |
\W |
A non-word character: [^\w] |
In advanced mode, you can define a set of objects with a pattern, object addresses or an Object Query Language (OQL) query. Icons and help messages give you information about the type of the argument.
You may enter a single parameter per line, such as a pattern, an object address, or an OQL query. Additional line for this type of the argument is added automatically, thus multiple arguments can be entered.
The object address has a hexadecimal form, that is it starts with the hex-prefix 0x and consists of one or more letters A-F and digits 0-9.
Example: 0x36d99c88
For more information about OQL, refer to the OQL syntax details