Skip to content

Commit 4e6fd4f

Browse files
committed
[Fix #129] Change defaults for paths to GC roots for exclude custom
Signed-off-by: Kevin Grigorenko <[email protected]>
1 parent f27747d commit 4e6fd4f

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

plugins/org.eclipse.mat.api/src/org/eclipse/mat/internal/snapshot/inspections/MultiplePath2GCRootsQuery.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2008, 2023 SAP AG, IBM Corporation and others.
2+
* Copyright (c) 2008, 2025 SAP AG, IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License 2.0
55
* which accompanies this distribution, and is available at
@@ -108,7 +108,9 @@ public String toString()
108108

109109
@Argument(isMandatory = false)
110110
public List<String> excludes = Arrays.asList( //
111-
new String[] { "java.lang.ref.WeakReference:referent", "java.lang.ref.SoftReference:referent" }); //$NON-NLS-1$ //$NON-NLS-2$
111+
new String[] { "java.lang.ref.WeakReference:referent", "java.lang.ref.SoftReference:referent", //$NON-NLS-1$ //$NON-NLS-2$
112+
"java.lang.ref.PhantomReference:referent", "java.lang.ref.Finalizer:unfinalized", //$NON-NLS-1$ //$NON-NLS-2$
113+
"java.lang.Runtime:<Unfinalized>" }); //$NON-NLS-1$
112114

113115
@Argument(isMandatory = false)
114116
public Grouping groupBy = Grouping.FROM_GC_ROOTS;

plugins/org.eclipse.mat.api/src/org/eclipse/mat/internal/snapshot/inspections/Path2GCRootsQuery.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2008, 2023 SAP AG and others.
2+
* Copyright (c) 2008, 2025 SAP AG and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License 2.0
55
* which accompanies this distribution, and is available at
@@ -75,7 +75,9 @@ public class Path2GCRootsQuery implements IQuery
7575

7676
@Argument(isMandatory = false)
7777
public List<String> excludes = Arrays.asList( //
78-
new String[] { "java.lang.ref.WeakReference:referent", "java.lang.ref.SoftReference:referent" }); //$NON-NLS-1$ //$NON-NLS-2$
78+
new String[] { "java.lang.ref.WeakReference:referent", "java.lang.ref.SoftReference:referent", //$NON-NLS-1$ //$NON-NLS-2$
79+
"java.lang.ref.PhantomReference:referent", "java.lang.ref.Finalizer:unfinalized", //$NON-NLS-1$ //$NON-NLS-2$
80+
"java.lang.Runtime:<Unfinalized>" }); //$NON-NLS-1$
7981

8082
@Argument(isMandatory = false)
8183
public int numberOfPaths = 30;

plugins/org.eclipse.mat.api/src/org/eclipse/mat/internal/snapshot/inspections/annotations.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
###############################################################################
2-
# Copyright (c) 2008, 2011 SAP AG and IBM Corporation.
2+
# Copyright (c) 2008, 2025 SAP AG and IBM Corporation.
33
# All rights reserved. This program and the accompanying materials
44
# are made available under the terms of the Eclipse Public License 2.0
55
# which accompanies this distribution, and is available at
@@ -25,7 +25,7 @@ ShowInDominatorQuery.groupBy.help = Whether to group the objects in the resultin
2525
Group by classloader puts the classloader object, all classes loaded by the classloader and all instances of those classes together.
2626

2727

28-
Path2GCRootsQuery.name = exclude custom field...
28+
Path2GCRootsQuery.name = exclude custom fields or classes...
2929
Path2GCRootsQuery.category = 3|Path To GC Roots
3030
Path2GCRootsQuery.menu.0.label = 1|with all references
3131
Path2GCRootsQuery.menu.1.label = 2|exclude weak references
@@ -41,11 +41,11 @@ The query only works for a single object.
4141
Path2GCRootsQuery.object.help = Specification for a single object for which paths to garbage collection roots should be found.\n\
4242
Do not use the class pattern unless the class just has a singleton instance.\n\
4343
Do not use the OQL query unless it returns a single object.
44-
Path2GCRootsQuery.excludes.help = Fields of certain classes which should be ignored when finding paths. \
44+
Path2GCRootsQuery.excludes.help = Fields of certain classes or entire classes which should be ignored when finding paths. \
4545
For example this allows paths through Weak or Soft Reference referents to be ignored.
4646
Path2GCRootsQuery.numberOfPaths.help = The number of different paths to be displayed.
4747

48-
MultiplePath2GCRootsQuery.name = exclude custom field...
48+
MultiplePath2GCRootsQuery.name = exclude custom fields or classes...
4949
MultiplePath2GCRootsQuery.category = 4|Merge Shortest Paths to GC Roots
5050
MultiplePath2GCRootsQuery.menu.0.label = 1|with all references
5151
MultiplePath2GCRootsQuery.menu.1.label = 2|exclude weak references
@@ -57,7 +57,7 @@ MultiplePath2GCRootsQuery.menu.6.label = 7|exclude phantom/weak references
5757
MultiplePath2GCRootsQuery.menu.7.label = 8|exclude all phantom/weak/soft etc. references
5858
MultiplePath2GCRootsQuery.help = Find common paths from garbage collection roots to an object or set of objects.
5959
MultiplePath2GCRootsQuery.objects.help = Objects for which paths to garbage collection roots should be found.
60-
MultiplePath2GCRootsQuery.excludes.help = Fields of certain classes which should be ignored when finding paths. \
60+
MultiplePath2GCRootsQuery.excludes.help = Fields of certain classes or entire classes which should be ignored when finding paths. \
6161
For example this allows paths through Weak or Soft Reference referents to be ignored.
6262
MultiplePath2GCRootsQuery.groupBy.help = Whether to show:\n\
6363
merged paths from garbage collection roots to the objects\n\

0 commit comments

Comments
 (0)