Hi Neil,

Thanks for noticing, you are right there are some bad design decisions in 
some methods of that class, please open a defect for the problems that you 
found.

Also whenever you find something that doesn't look right please open a 
defect.

Regarding your endeavor in using the TPTP model if you need any help 
please let me know, bellow I'll give a few entry points to ease your 
integration process:

- look at the most of the methods in the 
org.eclipse.hyades.trace.ui.internal.util.PerftraceUtil, (some are TPTP UI 
related, like getTime) to understand how different parts of the model are 
retrieved and used in the UI
- org.eclipse.hyades.trace.ui.internal.util.PDCoreUtil is another method 
which will give you some idea about how we interact with the AC agents 
when Attach or Profile launch configurations are used
- org.eclipse.hyades.trace.ui.internal.wizard.ImportTracePage1 is used to 
import profiling traces convert trcxml files containing the raw profiling 
events (in ZIP format) into TPTP Hierarchy/Trace EMF objects through  the 
loaders infrastructure
- /org.eclipse.tptp.platform.models/src-trace source folder contains the 
TPTP Trace EMF model code including the related loaders and services.
- /org.eclipse.tptp.platform.models/src-trace/model/trace.ecore is the EMF 
Ecore file for the TPTP Trace model, you can see UML diagrams here 
http://www.eclipse.org/tptp/platform/documents/resources/models/index.htm 
take a look at the Trace and Hierarchy packages.

Thanks !

Marius Slavescu
IBM Toronto Laboratory, Canada
Phone: 905-413-3610






"Neil Dunn" <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
03/09/2007 07:46 AM
Please respond to
TPTP Tracing and Profiling Tools Project developer discussions 
<tptp-tracing-profiling-tools-dev@eclipse.org>


To
"TPTP Tracing and Profiling Tools Project developer discussions" 
<tptp-tracing-profiling-tools-dev@eclipse.org>
cc

Subject
[tptp-tracing-profiling-tools-dev] Coding question






Hi Guys,

I'm making progress with my work but getting reasonably stuck wading
through the massive amounts of code that make up the TPTP profiler.

I came across the class
org.eclipse.hyades.trace.ui.internal.util.PerftraceUtil which has a
number of helper methods to get certain elements out of the EMF Trace
model.

Can someone explain the design of this code? It's very very strange.
There's huge amounts of duplication and some tihngs I don't
understand.

For example,

The code for getAllPackages given a model object returns an Object[]
of the TRCPackage elements. Why not jsut return the actual EList? Even
stranger, the Object[] is created using a static ArrayList called
tmpList. This isn't thread safe (and it's quite bad style).

My fellow colleagues say "there must be a reason" why the code has
been designed this way but I can't think of anything.

Any help would be much appreciated.

Cheers,
Neil
_______________________________________________
tptp-tracing-profiling-tools-dev mailing list
tptp-tracing-profiling-tools-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/tptp-tracing-profiling-tools-dev

_______________________________________________
tptp-tracing-profiling-tools-dev mailing list
tptp-tracing-profiling-tools-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/tptp-tracing-profiling-tools-dev

Reply via email to