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 88475 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 v2.0
197176patch2.txt (text/plain), 8.89 KB, created by
Ritwik Lodhiya
on 2008-01-31 16:58:40 EST
(
hide
)
Description:
Proposed Patch v2.0
Filename:
MIME Type:
Creator:
Ritwik Lodhiya
Created:
2008-01-31 16:58:40 EST
Size:
8.89 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 31 Jan 2008 21:40:43 -0000 >@@ -1,5 +1,5 @@ > /********************************************************************** >- * Copyright (c) 2005, 2006 IBM Corporation, Intel Corporation. >+ * Copyright (c) 2005, 2008 IBM Corporation, Intel Corporation. > * 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 >@@ -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++; >+ } >+ } > > } > >@@ -523,49 +546,77 @@ > else if(_methodDetailsType == CHILDREN_DETAILS) > { > //get nb of invocations called by the selected method >- if(selection != null) >+ >+ if(selection != null) >+ { >+ >+ Iterator i1 = ((TRCMethod)e1).getInvocations().iterator(); >+ while(i1.hasNext()) > { >- >- Iterator i1 = ((TRCMethod)e1).getInvocations().iterator(); >- while(i1.hasNext()) >- { >- TRCMethodInvocation mi = ((TRCMethodInvocation)i1.next()).getInvokedBy(); >- if(mi != null && mi.getMethod().equals(selection)) >+ TRCMethodInvocation mi = ((TRCMethodInvocation)i1.next()).getInvokedBy(); >+ if(mi != null && mi.getMethod().equals(selection)) { >+ if (mi instanceof TRCAggregatedMethodInvocation) { >+ nb1 += ((TRCAggregatedMethodInvocation) mi).getCount(); >+ } >+ else { > nb1++; >- >+ } > } > >- >- Iterator i2 = ((TRCMethod)e2).getInvocations().iterator(); >- while(i1.hasNext()) >- { >- TRCMethodInvocation mi = ((TRCMethodInvocation)i2.next()).getInvokedBy(); >- if(mi != null && mi.getMethod().equals(selection)) >+ } >+ >+ Iterator i2 = ((TRCMethod)e2).getInvocations().iterator(); >+ while(i2.hasNext()) >+ { >+ TRCMethodInvocation mi = ((TRCMethodInvocation)i2.next()).getInvokedBy(); >+ if(mi != null && mi.getMethod().equals(selection)) { >+ if (mi instanceof TRCAggregatedMethodInvocation) { >+ nb2 += ((TRCAggregatedMethodInvocation) mi).getCount(); >+ } >+ else { > nb2++; >- >+ } > } > > } > >+ } >+ > return _sortSequence * (nb1-nb2); > } > else if(_methodDetailsType == PARENT_DETAILS) > { > //get nb of invocations called by the selected method >- if(selection != null) >- { >- Iterator i = selection.getInvocations().iterator(); >- while(i.hasNext()) >- { >- TRCMethodInvocation mi = ((TRCMethodInvocation)i.next()).getInvokedBy(); >- if(mi != null && mi.getMethod().equals(e1)) >+ >+ if(selection != null) >+ { >+ Iterator i = selection.getInvocations().iterator(); >+ while(i.hasNext()) >+ { >+ TRCMethodInvocation mi = ((TRCMethodInvocation)i.next()); >+ >+ if(mi != null && mi.getInvokedBy().getMethod().equals(e1)) { >+ if (mi instanceof TRCAggregatedMethodInvocation) { >+ nb1 += ((TRCAggregatedMethodInvocation) mi).getCount(); >+ } >+ else { > nb1++; >- >- if(mi != null && mi.getMethod().equals(e2)) >- nb2++; >- } >+ } >+ } >+ >+ if(mi != null && mi.getInvokedBy().getMethod().equals(e2)) { >+ if (mi instanceof TRCAggregatedMethodInvocation) { >+ nb2 += ((TRCAggregatedMethodInvocation) mi).getCount(); >+ } >+ else { >+ nb2++; >+ } >+ } >+ > } > >+ } >+ > return _sortSequence * (nb1-nb2); > } > >@@ -630,10 +681,6 @@ > { > super.showPercentUpdate(); > >-// _callsCol.update(isShowPercent(), _totalCalls); >- >-// updateColumnLabelShowPercentage(_callsCol,isShowPercent()); >-// updateColumnLabelTotalCalls(_callsCol,_totalCalls); > } > > /** >@@ -669,11 +716,4 @@ > redrawTable(); > } > >-// public IContextLabelFormatProvider getContextFormatter(Object object, String attributeId) >-// { >-// if (object instanceof MethodCallDetails) >-// return super.getContextFormatter(((MethodCallDetails)object).getMethod(), attributeId); >-// else >-// return super.getContextFormatter(object, attributeId); >-// } > }
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