DESCRIPTION

tmf: Don't use ITmfEventField in TmfEventsTable

TmfEventsTable used ITmfEventFields to transfer what it calls
the "fields" of an event row in the table. These are simple Strings
at their heart though, ITmfEventField is used for event payloads only.

This removes many unnecessary object creations.

Change-Id: Ieb82651c6dc7b54505e24a1c21cfa3222a193bbf
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Braxton Mccarthy
date: 2014-05-08 22:35:34.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-05-08 22:44:22.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-05-08 23:25:49.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Ricky Reeves
date: 2014-05-09 14:11:12.000000000

Patch Set 2:

Please note that this API change breaks all our internal extensions that have a custom events table. This needs to be addressed after this patch is pushed. 

I wonder if it would be helpful to introduce a TextEventsTable which can be extended by trace types that are using the TextTrace of package org.eclipse.linuxtools.tmf.core.trace.text. Worth exploring.

-------------------------------------
author: Braxton Mccarthy
date: 2014-05-09 18:49:25.000000000

Patch Set 2:

Indeed, I thought about all our event tables breaking when doing this ;) I'll take care of updating them.

And yes a generic TextEventTable would probably help.

-------------------------------------
author: Luciana Barry
date: 2014-05-09 20:46:49.000000000

Patch Set 2: Code-Review-1

(4 comments)

Line:1853, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java -> I'm not sure what this TODO meant historically... but I don't see how column selection would affect this method? Perhaps just remove the TODO?

Line:189, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/parsers/custom/CustomEvent.java -> I think the javadoc is copy&paste but doesn't really apply well here. We're only concerned with the event here (not the table) so perhaps call the method getEventStrings instead?

Line:205, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/parsers/custom/CustomEvent.java -> We could get a NullPointerException on fData here.

Line:222, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/parsers/custom/CustomEvent.java -> Guaranteed NullPointerException on fColumnData here?
What I suggest is to make both methods getItemStrings() and getTimestamp() synchronized.

-------------------------------------
author: Braxton Mccarthy
date: 2014-05-09 22:42:16.000000000

Patch Set 2:

(3 comments)

Line:1853, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java -> Right, I'll use the TODO that was in the other file instead.

Line:189, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/parsers/custom/CustomEvent.java -> True, in fact this Javadoc (and the TODO) would go better on TmfEventsTable#getItemStrings.

Agreed on getEventStrings, it will differentiate it from the method in TmfEventsTable.

Line:222, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/parsers/custom/CustomEvent.java -> Gah, that's what happen with those non-final, nullable fields! :P

The original version did no synchronization whatsoever, so I think I will just revert it to that for this patch, and then we can focus on fixing the synchronization issues correctly, separately.

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