blob: fe68ede74ff31db5a5dde974ea326c03c394d746 [file] [log] [blame]
<?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 xml:lang="en-us" lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="DC.Type" content="task"/>
<meta name="DC.Title" content="Memory Analyzer Configuration"/>
<meta name="copyright" content="Copyright (c) 2008, 2012 SAP AG and others. 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 " type="primary"/>
<meta name="DC.Rights.Owner" content="Copyright (c) 2008, 2012 SAP AG and others. 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 " type="primary"/>
<meta name="DC.Format" content="XHTML"/>
<meta name="DC.Identifier" content="task_configure_mat"/>
<meta name="DC.Language" content="en-us"/>
<link rel="stylesheet" type="text/css" href="../styles/commonltr.css"/>
<title>Memory Analyzer Configuration</title>
</head>
<body id="task_configure_mat">
<h1 class="title topictitle1">Memory Analyzer Configuration</h1>
<div class="body taskbody">
<div class="section context">
<p class="p">
Well, analyzing big heap dumps can also require more heap space.
Give it
some more memory (possible by running on a 64-bit machine):
</p>
<samp class="ph codeph">MemoryAnalyzer.exe -vmargs -Xmx4g</samp>
<p class="p">Alternatively, edit the MemoryAnalyzer.ini to
contain:</p>
<div class="p">
<pre class="pre codeblock">-vmargs
-Xmx4g</pre>
</div>
<p class="p">
For more details, check out the section
<a class="xref" href="http://help.eclipse.org/topic/org.eclipse.platform.doc.user/tasks/running_eclipse.htm">Running Eclipse</a>
in the Help Center. It also contains more details if you are running
on Mac OS X.
</p>
<p class="p">If you are running the Memory Analyzer inside your Eclipse SDK,
you need to edit the eclipse.ini file.</p>
<div class="p">The memory intensive parts are the parsing of the dump and building
of the dominator tree. Try parsing the heap
dump from the command line, perhaps on a bigger machine. The dumps
and index files can then be copied to a more convenient machine.
Once the dump has been parsed, it usually can
be opened with less memory in the GUI.
As a rough estimate if the number of objects is N and the number of
classes C, it might take at least T bytes to parse and build the dominator tree
where:
<p class="lines">T ≈ N * 28.25 + C * 1000 + P</p>
P is the space used by the DTFJ or HPROF parsers. For a PHD file, the space could be:
<p class="lines">P ≈ C * 1000</p>
Memory Analyzer uses additional memory for caching index files, so
performance will be better if there is more memory available than the minimum
required to parse a dump.
</div>
<p class="p">Memory Analyzer has an architectural limit of 2<sup class="ph sup">31</sup> - 3 objects,
a current limit of 2<sup class="ph sup">31</sup> - 8 = 2,147,483,640 objects, but has not been
tested with that many objects. The current record is a heap dump file of 70Gbytes
containing 1,160,000,000 objects, which was opened with Memory Analyzer running
with a 64Gbyte heap.</p>
<p class="p">The preference page is opened via a menu option.
<span class="ph menucascade"><span class="ph uicontrol">Window</span> &gt; <span class="ph uicontrol">Preferences</span></span>
</p>
<div class="p">The preferences page allows various aspects of Memory Analyzer to be controlled.
<img class="image" src="../mimes/preferences.png" alt="preferences page showing general options with DTFJ subpage"/>
<dl class="dl">
<dt class="dt dlterm">Keep unreachable objects</dt>
<dd class="dd">Objects that appear unreachable from GC roots are not discarded in an early stage of
Memory Analyzer processing, but are retained for further analysis.</dd>
<dt class="dt dlterm">Hide the getting started wizard</dt>
<dd class="dd">Controls whether to display a wizard for leak suspects, top components after opening
a snapshot.</dd>
<dt class="dt dlterm">Hide popup query help</dt>
<dd class="dd">Do not display the help panel underneath the query wizard, unless F1 or the help button
is pressed.</dd>
<dt class="dt dlterm">
<span class="ph menucascade"><span class="ph uicontrol">Memory Analyzer</span> &gt; <span class="ph uicontrol">DTFJ Parser</span> &gt; <span class="ph uicontrol">Stack frames</span></span>
</dt>
<dd class="dd">
Normally stack frames are just shown in the Thread overview and stacks query.
This option allows stack frames to be treated as objects which are then visible like any other Java object in a Memory Analyzer view.
<dl class="dl">
<dt class="dt dlterm">Normal
</dt>
<dd class="dd">Stack frames are just shown in the Thread overview and stacks query.
</dd>
<dt class="dt dlterm">Only stack frames as pseudo-objects
</dt>
<dd class="dd">
Stack frames are of type <samp class="ph codeph">&lt;stack frame&gt;</samp>, size 0, with method names and source file
and line numbers via fields and a name resolver.
<p class="p">This is useful when looking at paths to and from objects via local variables as the stack frames are visible in
the paths to GC roots queries.</p>
</dd>
<dt class="dt dlterm">Stack frames as pseudo-objects and running methods as pseudo-classes
</dt>
<dd class="dd">Stack frames of are of type <samp class="ph codeph">packageName.className.methodName(Signature)ReturnType</samp> extending <samp class="ph codeph">&lt;method&gt;</samp> representing the method being executed,
of size the stack frame size, with source file and line number via fields and a name resolver,
and those methods are pseudo-classes of type <samp class="ph codeph">&lt;method type&gt;</samp> of size 0.
<p class="p">This can be useful to find out which methods are currently running and how much stack space they take up.
To examine running methods then take the histogram view, filter by '\(', then sort by instances or instance size.
</p>
</dd>
<dt class="dt dlterm">Stack frames as pseudo-objects and all methods as pseudo-classes
</dt>
<dd class="dd">Stack frames of are of type <samp class="ph codeph">packageName.className.methodName(Signature)ReturnType</samp> extending <samp class="ph codeph">&lt;method&gt;</samp>codeph&gt; representing the method being executed,
of size the stack frame size, with source file and line number via fields and a name resolver,
and all methods are pseudo-classes of type <samp class="ph codeph">&lt;method type&gt;</samp> of size based on the JITted and byte code sizes. The method sizes are then not part of the class size.
<p class="p">This can be useful to find out which methods have large JITted or byte code sizes. They can be viewed by going to the histogram view,
then selecting <samp class="ph codeph">&lt;method type&gt;</samp> and listing objects.
</p>
</dd>
</dl>
</dd>
<dt class="dt dlterm">
<span class="ph menucascade"><span class="ph uicontrol">Memory Analyzer</span> &gt; <span class="ph uicontrol">DTFJ Parser</span> &gt; <span class="ph uicontrol">Suppress Class native memory size calculations (IBM system dumps)</span></span>
</dt>
<dd class="dd">
By default, when MAT parses IBM system dumps, the size of classes includes some of the amount of native memory in the Java process (but outside of the Java heap) which is related to those classes such as native memory for bytecode and JIT compiled code for the class methods. Check this option to disable this calculation and only report Java heap usage.
</dd>
<dt class="dt dlterm">
<span class="ph menucascade"><span class="ph uicontrol">Memory Analyzer</span> &gt; <span class="ph uicontrol">HPROF Parser</span> &gt; <span class="ph uicontrol">Parser Strictness</span></span>
</dt>
<dd class="dd">
By default, the HPROF parser runs in strict mode. This means that
any deviation in the file from the
<a class="xref" href="http://java.net/downloads/heap-snapshot/hprof-binary-format.html">HPROF specification</a>
is treated as a severe error, an exception is thrown, and dump
processing stops. There is one exception to this rule which is
that we can reliably workaround the observed issue in
<a class="xref" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=404679">bug #404679</a>
.
<p class="p">This
is a change in behavior from previous
releases when a
warning
was
shown in the error log and processing
continued. This
default
change was made to alert the user to a
potential problem
either
with the file itself or a bug in the JVM
or in MAT. You may
choose
to change the strictness of the parser:</p>
<dl class="dl">
<dt class="dt dlterm">Strict
</dt>
<dd class="dd">Default. Any deviation from the HPROF specification causes
an exception to be thrown and processing to stop (with the
exception of bug #404679). This option may be specified on the
command line with -DhprofStrictnessStop=true
</dd>
<dt class="dt dlterm">Warning
</dt>
<dd class="dd">
Choose this option to revert to the old behavior where a
warning is printed to the error log and processing continues.
This option is not recommended because the warning is probably
a sign of a problem. Please open a bug report instead. This
option may be specified on the
command line with
-DhprofStrictnessWarning=true
</dd>
</dl>
</dd>
<dt class="dt dlterm">
<span class="ph menucascade"><span class="ph uicontrol">General</span> &gt; <span class="ph uicontrol">Appearance</span> &gt; <span class="ph uicontrol">Colors and Fonts</span> &gt; <span class="ph uicontrol">Memory Analyzer</span> &gt; <span class="ph uicontrol">OQL comment color</span></span>
</dt>
<dd class="dd">Modify the color of comments in the Object Query Language (OQL) studio.</dd>
<dt class="dt dlterm">
<span class="ph menucascade"><span class="ph uicontrol">General</span> &gt; <span class="ph uicontrol">Appearance</span> &gt; <span class="ph uicontrol">Colors and Fonts</span> &gt; <span class="ph uicontrol">Memory Analyzer</span> &gt; <span class="ph uicontrol">OQL keyword color</span></span>
</dt>
<dd class="dd">Modify the color of keywords in the Object Query Language (OQL) studio.</dd>
</dl>
</div>
</div>
</div>
</body>
</html>