Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Grigorenko2018-09-11 17:23:11 -0400
committerKevin Grigorenko2018-10-03 16:18:03 -0400
commitf45a8cf2271c9f446d5664390365690856b58254 (patch)
tree17e5c5cd5075c54368e50efe1816b9185bbc5520
parent6a2d8b9937167a00f35852bdeb99a8ccd307fad5 (diff)
downloadorg.eclipse.mat-f45a8cf2271c9f446d5664390365690856b58254.tar.gz
org.eclipse.mat-f45a8cf2271c9f446d5664390365690856b58254.tar.xz
org.eclipse.mat-f45a8cf2271c9f446d5664390365690856b58254.zip
[538953] Add option to suppress class native sizes for IBM coredumps.
-rw-r--r--plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/DTFJIndexBuilder.java8
-rw-r--r--plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/DTFJPreferencePage.java3
-rw-r--r--plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/Messages.java1
-rw-r--r--plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/PreferenceConstants.java2
-rw-r--r--plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/PreferenceInitializer.java1
-rw-r--r--plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/messages.properties1
-rw-r--r--plugins/org.eclipse.mat.ui.help/concepts/heapdump.dita18
-rw-r--r--plugins/org.eclipse.mat.ui.help/concepts/heapdump.html19
-rw-r--r--plugins/org.eclipse.mat.ui.help/tasks/configure_mat.dita12
-rw-r--r--plugins/org.eclipse.mat.ui.help/tasks/configure_mat.html10
10 files changed, 61 insertions, 14 deletions
diff --git a/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/DTFJIndexBuilder.java b/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/DTFJIndexBuilder.java
index 5776b77f..a85372c9 100644
--- a/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/DTFJIndexBuilder.java
+++ b/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/DTFJIndexBuilder.java
@@ -197,6 +197,8 @@ public class DTFJIndexBuilder implements IIndexBuilder
private static final boolean faultyMethodEquals = false;
private final String methodsAsClassesPref = Platform.getPreferencesService().getString(PLUGIN_ID,
PreferenceConstants.P_METHODS, "", null); //$NON-NLS-1$
+ private final boolean suppressClassNativeSizes = Platform.getPreferencesService().getBoolean(PLUGIN_ID,
+ PreferenceConstants.P_SUPPRESS_CLASS_NATIVE_SIZES, false, null); //$NON-NLS-1$
/** Whether to represent all methods as pseudo-classes */
private final boolean getExtraInfo2 = PreferenceConstants.ALL_METHODS_AS_CLASSES.equals(methodsAsClassesPref);
/** Whether to represent only the stack frames as pseudo-objects */
@@ -6214,8 +6216,10 @@ public class DTFJIndexBuilder implements IIndexBuilder
// listener.sendUserMessage(Severity.WARNING, "Problem setting size
// of instance of java.lang.Class", e);
}
- // TODO should we use segments to get the RAM/ROM class size?
- size += classSize(j2, listener);
+ if (!suppressClassNativeSizes) {
+ // TODO should we use segments to get the RAM/ROM class size?
+ size += classSize(j2, listener);
+ }
ci.setUsedHeapSize(size);
if (debugInfo)
{
diff --git a/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/DTFJPreferencePage.java b/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/DTFJPreferencePage.java
index 57aa6980..1d088c2d 100644
--- a/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/DTFJPreferencePage.java
+++ b/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/DTFJPreferencePage.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.mat.dtfj;
+import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.RadioGroupFieldEditor;
@@ -54,6 +55,8 @@ public class DTFJPreferencePage extends FieldEditorPreferencePage implements IWo
{ Messages.DTFJPreferencePage_RunningMethods, PreferenceConstants.RUNNING_METHODS_AS_CLASSES },
{ Messages.DTFJPreferencePage_AllMethods, PreferenceConstants.ALL_METHODS_AS_CLASSES } },
getFieldEditorParent(), true));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_SUPPRESS_CLASS_NATIVE_SIZES, Messages.DTFJPreferencePage_SuppressClassNativeSizes,
+ getFieldEditorParent()));
}
/*
diff --git a/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/Messages.java b/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/Messages.java
index b98cee7f..a78902f7 100644
--- a/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/Messages.java
+++ b/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/Messages.java
@@ -229,6 +229,7 @@ public class Messages extends NLS
public static String DTFJPreferencePage_NoMethods;
public static String DTFJPreferencePage_OnlyStackFrames;
public static String DTFJPreferencePage_RunningMethods;
+ public static String DTFJPreferencePage_SuppressClassNativeSizes;
public static String InitDTFJ_FailedToCreate;
public static String InitDTFJ_UpdatingBundle;
public static String InitDTFJ_UpdatedBundle;
diff --git a/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/PreferenceConstants.java b/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/PreferenceConstants.java
index 424fa10e..9646572f 100644
--- a/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/PreferenceConstants.java
+++ b/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/PreferenceConstants.java
@@ -17,6 +17,8 @@ public class PreferenceConstants
{
/** Whether to treat stack frames as psuedo-objects and methods as pseudo-classes */
public static final String P_METHODS = "methodsAsClasses"; //$NON-NLS-1$
+ public static final String P_SUPPRESS_CLASS_NATIVE_SIZES = "suppressClassNativeSizes"; //$NON-NLS-1$
+
public static final String NO_METHODS_AS_CLASSES = "none"; //$NON-NLS-1$
public static final String RUNNING_METHODS_AS_CLASSES = "running"; //$NON-NLS-1$
public static final String ALL_METHODS_AS_CLASSES = "all"; //$NON-NLS-1$
diff --git a/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/PreferenceInitializer.java b/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/PreferenceInitializer.java
index 61890a13..1cec5579 100644
--- a/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/PreferenceInitializer.java
+++ b/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/PreferenceInitializer.java
@@ -30,6 +30,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer
{
IPreferenceStore store = (IPreferenceStore)InitDTFJ.getDefault().getPreferenceStore();
store.setDefault(PreferenceConstants.P_METHODS, PreferenceConstants.NO_METHODS_AS_CLASSES);
+ store.setDefault(PreferenceConstants.P_SUPPRESS_CLASS_NATIVE_SIZES, false);
}
catch (LinkageError e)
{
diff --git a/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/messages.properties b/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/messages.properties
index bd9805b8..e982edbc 100644
--- a/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/messages.properties
+++ b/plugins/org.eclipse.mat.dtfj/src/org/eclipse/mat/dtfj/messages.properties
@@ -217,6 +217,7 @@ DTFJPreferencePage_MethodsAsClasses=Whether to treat stack frames as pseudo-obje
DTFJPreferencePage_NoMethods=Normal
DTFJPreferencePage_OnlyStackFrames=Only stack frames as pseudo-objects
DTFJPreferencePage_RunningMethods=Stack frames as pseudo-objects and running methods as pseudo-classes
+DTFJPreferencePage_SuppressClassNativeSizes=Suppress Class native memory size calculations (IBM system dumps)
InitDTFJ_FailedToCreate=Failed DTFJ install test, updating bundle to resolve DTFJ references
InitDTFJ_UpdatingBundle=Updating bundle
InitDTFJ_UpdatedBundle=Updated bundle to resolve DTFJ references
diff --git a/plugins/org.eclipse.mat.ui.help/concepts/heapdump.dita b/plugins/org.eclipse.mat.ui.help/concepts/heapdump.dita
index 0fe0a22d..176dbced 100644
--- a/plugins/org.eclipse.mat.ui.help/concepts/heapdump.dita
+++ b/plugins/org.eclipse.mat.ui.help/concepts/heapdump.dita
@@ -27,18 +27,18 @@
<conbody>
<p>A heap dump is a snapshot of the memory of a Java process at a certain point of time.
- There are different formats for persisting this data, and depending on the format it may
- contain different pieces of information, but in general the snapshot contains information
- about the java objects and classes in the heap at the moment the snapshot was triggered.
- Usually a full GC is triggered before the heap dump is written so it contains
+ There are different formats for persisting this data, and depending on the format, may
+ contain different pieces of information; but, in general, the snapshot contains information
+ about the Java objects and classes in the heap at the moment the snapshot was triggered.
+ In some cases, a full GC is triggered before the heap dump is written so it contains
information about the remaining objects.</p>
<p>The Memory Analyzer is able to work with HPROF binary heap dumps,
- IBM system dumps (after preprocessing them), and IBM portable heap dumps (PHD)
+ IBM system dumps (old versions require preprocessing), and IBM portable heap dumps (PHD)
from a variety of platforms.
</p>
<p>
- Typical information which can be found in heap dumps (once more - depending on the heap dump type) is:
+ Typical information which can be found in heap dumps (depending on the heap dump type):
</p>
<ul>
@@ -49,6 +49,12 @@
<li>
All Classes
<p>Classloader, name, super class, static fields</p>
+ <p>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. In some cases, this may cause the total size reported on the Overview pane to
+ exceed the maximum Java heap size. This calculation may be disabled using an option
+ in the MAT configuration.</p>
</li>
<li>
Garbage Collection Roots
diff --git a/plugins/org.eclipse.mat.ui.help/concepts/heapdump.html b/plugins/org.eclipse.mat.ui.help/concepts/heapdump.html
index 53a3b5b6..5e88a658 100644
--- a/plugins/org.eclipse.mat.ui.help/concepts/heapdump.html
+++ b/plugins/org.eclipse.mat.ui.help/concepts/heapdump.html
@@ -24,20 +24,20 @@
<div class="body conbody">
<p class="p">A heap dump is a snapshot of the memory of a Java process at a certain point of time.
- There are different formats for persisting this data, and depending on the format it may
- contain different pieces of information, but in general the snapshot contains information
- about the java objects and classes in the heap at the moment the snapshot was triggered.
- Usually a full GC is triggered before the heap dump is written so it contains
+ There are different formats for persisting this data, and depending on the format, may
+ contain different pieces of information; but, in general, the snapshot contains information
+ about the Java objects and classes in the heap at the moment the snapshot was triggered.
+ In some cases, a full GC is triggered before the heap dump is written so it contains
information about the remaining objects.</p>
<p class="p">The Memory Analyzer is able to work with HPROF binary heap dumps,
- IBM system dumps (after preprocessing them), and IBM portable heap dumps (PHD)
+ IBM system dumps (old versions require preprocessing), and IBM portable heap dumps (PHD)
from a variety of platforms.
</p>
<p class="p">
- Typical information which can be found in heap dumps (once more - depending on the heap dump type) is:
+ Typical information which can be found in heap dumps (depending on the heap dump type):
</p>
@@ -52,6 +52,13 @@
All Classes
<p class="p">Classloader, name, super class, static fields</p>
+ <p class="p">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. In some cases, this may cause the total size reported on the Overview pane to
+ exceed the maximum Java heap size. This calculation may be disabled using an option
+ in the MAT configuration.</p>
+
</li>
<li class="li">
diff --git a/plugins/org.eclipse.mat.ui.help/tasks/configure_mat.dita b/plugins/org.eclipse.mat.ui.help/tasks/configure_mat.dita
index 1527a126..c9405df4 100644
--- a/plugins/org.eclipse.mat.ui.help/tasks/configure_mat.dita
+++ b/plugins/org.eclipse.mat.ui.help/tasks/configure_mat.dita
@@ -157,6 +157,18 @@ and all methods are pseudo-classes of type <codeph>&lt;method type&gt;</codeph>
</dd>
</dlentry>
+ <dlentry>
+ <dt>
+ <menucascade>
+ <uicontrol>Memory Analyzer</uicontrol>
+ <uicontrol>DTFJ Parser</uicontrol>
+ <uicontrol>Suppress Class native memory size calculations (IBM system dumps)</uicontrol>
+ </menucascade>
+ </dt>
+ <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>
+ </dlentry>
<dlentry>
<dt>
<menucascade>
diff --git a/plugins/org.eclipse.mat.ui.help/tasks/configure_mat.html b/plugins/org.eclipse.mat.ui.help/tasks/configure_mat.html
index a32b6eac..fe68ede7 100644
--- a/plugins/org.eclipse.mat.ui.help/tasks/configure_mat.html
+++ b/plugins/org.eclipse.mat.ui.help/tasks/configure_mat.html
@@ -173,6 +173,16 @@ and all methods are pseudo-classes of type <samp class="ph codeph">&lt;method ty
</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>

Back to the top