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 87807 Details for
Bug 197176
Method Invocation Details: cannot understand "invoked by" and "invokes" columns
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]
Proposed Patch
197176patch.txt (text/plain), 5.96 KB, created by
Ritwik Lodhiya
on 2008-01-24 16:25:31 EST
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Ritwik Lodhiya
Created:
2008-01-24 16:25:31 EST
Size:
5.96 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.hyades.trace.views >Index: src/org/eclipse/hyades/trace/views/internal/MethodDetailsStatistic.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.hyades.trace.views/src/org/eclipse/hyades/trace/views/internal/MethodDetailsStatistic.java,v >retrieving revision 1.26 >diff -u -r1.26 MethodDetailsStatistic.java >--- src/org/eclipse/hyades/trace/views/internal/MethodDetailsStatistic.java 21 Sep 2006 19:19:29 -0000 1.26 >+++ src/org/eclipse/hyades/trace/views/internal/MethodDetailsStatistic.java 24 Jan 2008 21:16:40 -0000 >@@ -13,7 +13,7 @@ > > import java.util.HashMap; > import java.util.Iterator; >- >+import org.eclipse.hyades.models.trace.TRCAggregatedMethodInvocation; > import org.eclipse.hyades.models.trace.TRCMethod; > import org.eclipse.hyades.models.trace.TRCMethodInvocation; > import org.eclipse.hyades.trace.ui.internal.util.TString; >@@ -275,16 +275,21 @@ > Iterator children = inv.getInvokes().iterator(); > while(children.hasNext()) > { >- TRCMethod m = ((TRCMethodInvocation)children.next()).getMethod(); >+ TRCMethodInvocation child_inv = (TRCMethodInvocation)children.next(); >+ TRCMethod m = child_inv.getMethod(); > >+ int count = 1; >+ if (child_inv instanceof TRCAggregatedMethodInvocation) { >+ count = ((TRCAggregatedMethodInvocation) child_inv).getCount(); >+ } >+ > Object value = tmpMap.get(m); >- if(value != null) >- { >- int i = ((Integer)value).intValue()+1; >- tmpMap.put(m, new Integer(i)); >+ if(value != null) { >+ tmpMap.put(m, new Integer(((Integer)value).intValue() + count)); >+ } >+ else { >+ tmpMap.put(m, new Integer(count)); > } >- else >- tmpMap.put(m, new Integer(1)); > } > } > >@@ -317,23 +322,28 @@ > Iterator iterator = method.getInvocations().iterator(); > while(iterator.hasNext()) > { >- TRCMethodInvocation inv = (TRCMethodInvocation) iterator.next(); >- >- if(inv.getInvokedBy() == null) >- continue; >- >- TRCMethod m = inv.getInvokedBy().getMethod(); >- >- Object value = tmpMap.get(m); >- if(value != null) >- { >- int i = ((Integer)value).intValue()+1; >- tmpMap.put(m, new Integer(i)); >- } >- else >- tmpMap.put(m, new Integer(1)); >- } >- >+ TRCMethodInvocation inv = (TRCMethodInvocation) iterator.next(); >+ >+ if(inv.getInvokedBy() == null) >+ continue; >+ >+ TRCMethod m = inv.getInvokedBy().getMethod(); >+ >+ int count = 1; >+ if (inv instanceof TRCAggregatedMethodInvocation) { >+ count = ((TRCAggregatedMethodInvocation) inv).getCount(); >+ } >+ >+ Object value = tmpMap.get(m); >+ if(value != null) >+ { >+ tmpMap.put(m, new Integer(((Integer)value).intValue() + count)); >+ } >+ else { >+ tmpMap.put(m, new Integer(count)); >+ } >+ } >+ > Iterator methods = tmpMap.keySet().iterator(); > while(methods.hasNext()) > { >@@ -388,8 +398,14 @@ > while(i.hasNext()) > { > TRCMethodInvocation mi = ((TRCMethodInvocation)i.next()).getInvokedBy(); >- if(mi != null && mi.getMethod().equals(selection)) >- nb++; >+ if(mi != null && mi.getMethod().equals(selection)) { >+ if (mi instanceof TRCAggregatedMethodInvocation) { >+ nb += ((TRCAggregatedMethodInvocation) mi).getCount(); >+ } >+ else { >+ nb++; >+ } >+ } > > } > >@@ -407,9 +423,16 @@ > Iterator i = selection.getInvocations().iterator(); > while(i.hasNext()) > { >- TRCMethodInvocation mi = ((TRCMethodInvocation)i.next()).getInvokedBy(); >- if(mi != null && mi.getMethod().equals(m)) >- nb++; >+ TRCMethodInvocation mi = ((TRCMethodInvocation)i.next()); >+ >+ if(mi != null && mi.getInvokedBy().getMethod().equals(m)) { >+ if (mi instanceof TRCAggregatedMethodInvocation) { >+ nb += ((TRCAggregatedMethodInvocation) mi).getCount(); >+ } >+ else { >+ nb++; >+ } >+ } > > } > >@@ -557,12 +580,35 @@ > Iterator i = selection.getInvocations().iterator(); > while(i.hasNext()) > { >- TRCMethodInvocation mi = ((TRCMethodInvocation)i.next()).getInvokedBy(); >- if(mi != null && mi.getMethod().equals(e1)) >- nb1++; > >- if(mi != null && mi.getMethod().equals(e2)) >- nb2++; >+ TRCMethodInvocation mi = ((TRCMethodInvocation)i.next()); >+ >+ if(mi != null && mi.getInvokedBy().getMethod().equals(e1)) { >+ if (mi instanceof TRCAggregatedMethodInvocation) { >+ nb1 += ((TRCAggregatedMethodInvocation) mi).getCount(); >+ } >+ else { >+ nb1++; >+ } >+ } >+ >+// TRCMethodInvocation mi = ((TRCMethodInvocation)i.next()); >+ >+ if(mi != null && mi.getInvokedBy().getMethod().equals(e2)) { >+ if (mi instanceof TRCAggregatedMethodInvocation) { >+ nb2 += ((TRCAggregatedMethodInvocation) mi).getCount(); >+ } >+ else { >+ nb2++; >+ } >+ } >+ >+// TRCMethodInvocation mi = ((TRCMethodInvocation)i.next()).getInvokedBy(); >+// if(mi != null && mi.getMethod().equals(e1)) >+// nb1++; >+// >+// if(mi != null && mi.getMethod().equals(e2)) >+// nb2++; > } > } >
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 197176
:
81668
|
82737
|
87456
|
87463
|
87464
|
87550
|
87584
|
87807
|
88452
|
88453
|
88475
|
88631
|
92241
|
92292