DESCRIPTION

btf: Initial Best Trace Format commit

The BTF trace format was defined by Timing Architects for the
Eclipse Automotive IWG.

The specification is available here:
http://wiki.eclipse.org/File:TA_BTF_Specification_2.1.3_Eclipse_Auto_IWG.pdf

Change-Id: I4726279d528d558507d06d2b0e8fd3f0149c810b
Signed-off-by: Ivy Mitchell xxx@xxx.xxx
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Ivy Mitchell
date: 2014-05-09 17:33:28.000000000

Uploaded patch set 11.

-------------------------------------
author: Braxton Mccarthy
date: 2014-05-09 18:55:46.000000000

Patch Set 11: Code-Review-1

(8 comments)

Gerrit likes to split comments in two...

I thought about it, and realized the big complexity of the BTF evnet fields is due to using sub-fields for the Descriptions. As I mentioned in a previous review, the Descriptions are nice, but event field sub-fields are not the best place to put them.

If you define a BtfEventField type, which does not have any notion of sub-fields (throws UnspportedOperationException etc.), it would simplify this patch A LOT. Like the majority BtfEventFieldTypeIdFactory would not be necessary. Then afterwards we could look for a place to expose the descriptions.

Something like a custom EventPropertySource, which adds the Description sub-tree and does the lookup when needed, instead of it being explicitely stored in the EventField object?

Line:41, lttng/org.eclipse.linuxtools.btf.core.tests/src/org/eclipse/linuxtools/btf/core/tests/trace/BtfTraceTest.java -> It should not be called Test* something if it's not a test method. Like setup() or whatever.

xxx@xxx.xxx should close it too.

Line:34, lttng/org.eclipse.linuxtools.btf.core/src/org/eclipse/linuxtools/btf/core/trace/BtfTypeFactory.java -> Isn't this more a BtfEventFieldFactory than a TypeFactory?

This class can still be split in two : the things related to the event types, and the things related to even *fields*. And they should implement ITmfEventType and ITmfEventField, respectively.

Line:39, lttng/org.eclipse.linuxtools.btf.core/src/org/eclipse/linuxtools/btf/core/trace/BtfTypeFactory.java -> put the }; on a separate line

Line:45, lttng/org.eclipse.linuxtools.btf.core/src/org/eclipse/linuxtools/btf/core/trace/BtfTypeFactory.java -> }; on separate line, and add an empty line after

Line:97, lttng/org.eclipse.linuxtools.btf.core/src/org/eclipse/linuxtools/btf/core/trace/BtfTypeFactory.java -> Once again, the most important issue in this file, and the comment was completely ignored...

This should be its own BtfEventType class, which extends (I)TmfEventField. Afterwards you can use covariant return types to use BtfEvent* classes everywhere.

Line:433, lttng/org.eclipse.linuxtools.btf.core/src/org/eclipse/linuxtools/btf/core/trace/BtfTrace.java -> null check first, in case this gets called before initTrace().

Now we're starting to see how this initTrace() thing separated of the constructor is such a bad idea.

Line:80, lttng/org.eclipse.linuxtools.btf.core.tests/src/org/eclipse/linuxtools/btf/core/tests/utils/BtfTestTrace.java -> can be unindented

Line:36, lttng/org.eclipse.linuxtools.btf.ui/src/org/eclipse/linuxtools/btf/ui/BtfEventAdapterFactory.java -> shouldn't you use isAssignableFrom() instead, in case it's a subclass? Not sure here...

-------------------------------------
author: Brenden Conley
date: 2014-05-09 19:58:44.000000000

Patch Set 11:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6950/

-------------------------------------
author: Brenden Conley
date: 2014-05-09 20:35:37.000000000

Patch Set 11: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6950/ : SUCCESS

-------------------------------------
author: Ivy Mitchell
date: 2014-05-12 14:42:33.000000000

Patch Set 11:

(3 comments)

Line:97, lttng/org.eclipse.linuxtools.btf.core/src/org/eclipse/linuxtools/btf/core/trace/BtfTypeFactory.java -> This seems to be an issue, it was however discussed to make sure the right solution is chosen before we do a wiggle of successive approximations.

Line:433, lttng/org.eclipse.linuxtools.btf.core/src/org/eclipse/linuxtools/btf/core/trace/BtfTrace.java -> Now?

Line:1, lttng/org.eclipse.linuxtools.btf.ui/btf-view.xml -> Do we need a copyright header?

-------------------------------------
