Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 200542 Details for
Bug 353341
Proposed patch to add IHeapObjectArgument to ThreadOverviewQuery
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch to add IHeapObjectArgument to ThreadOverviewQuery V2
thread_overview_inputV2.patch (text/plain), 2.29 KB, created by
Kevin Grigorenko
on 2011-07-28 12:08:53 EDT
(
hide
)
Description:
Patch to add IHeapObjectArgument to ThreadOverviewQuery V2
Filename:
MIME Type:
Creator:
Kevin Grigorenko
Created:
2011-07-28 12:08:53 EDT
Size:
2.29 KB
patch
obsolete
>Index: src/org/eclipse/mat/inspections/threads/ThreadOverviewQuery.java >=================================================================== >--- src/org/eclipse/mat/inspections/threads/ThreadOverviewQuery.java (revision 1164) >+++ src/org/eclipse/mat/inspections/threads/ThreadOverviewQuery.java (working copy) >@@ -34,6 +34,7 @@ > import org.eclipse.mat.query.annotations.Icon; > import org.eclipse.mat.snapshot.ISnapshot; > import org.eclipse.mat.snapshot.model.IClass; >+import org.eclipse.mat.snapshot.query.IHeapObjectArgument; > import org.eclipse.mat.snapshot.query.Icons; > import org.eclipse.mat.snapshot.query.SnapshotQuery; > import org.eclipse.mat.util.IProgressListener; >@@ -45,21 +46,39 @@ > @Argument > public ISnapshot snapshot; > >+ @Argument(isMandatory = false, flag = Argument.UNFLAGGED) >+ public IHeapObjectArgument objects; >+ > public IResult execute(IProgressListener listener) throws Exception > { > listener.subTask(Messages.ThreadOverviewQuery_SearchingThreads); > > List<ThreadInfoImpl> result = new ArrayList<ThreadInfoImpl>(); > >- Collection<IClass> classes = snapshot.getClassesByName("java.lang.Thread", true); //$NON-NLS-1$ >- if (classes != null) >- for (IClass clasz : classes) >+ if (objects != null) >+ { >+ for (int[] objectIds : objects) >+ { >+ for (int objectId : objectIds) >+ { >+ result.add(ThreadInfoImpl.build(snapshot.getObject(objectId), false, listener)); >+ } >+ } >+ } >+ else >+ { >+ Collection<IClass> classes = snapshot.getClassesByName("java.lang.Thread", true); //$NON-NLS-1$ >+ if (classes != null) > { >- for (int id : clasz.getObjectIds()) >+ for (IClass clasz : classes) > { >- result.add(ThreadInfoImpl.build(snapshot.getObject(id), false, listener)); >+ for (int id : clasz.getObjectIds()) >+ { >+ result.add(ThreadInfoImpl.build(snapshot.getObject(id), false, listener)); >+ } > } > } >+ } > > Collections.sort(result, new Comparator<ThreadInfoImpl>() > { >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 353341
:
200541
| 200542