DESCRIPTION

TMF: Entries in AbstractTimeGraphView are not necessarily linked to a trace

The entry list map used to map an entry list with a trace object, but some
views might want to link entries to something else than a trace, for instance
sub-views that depend on the selection from another view.

Change-Id: Idfafbad14a64ca69c60b42740f04c3b84664dc29
Signed-off-by: Aryana Jones xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-08-01 20:04:58.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/3089/

-------------------------------------
author: Annalise Jimenez
date: 2013-08-01 20:07:30.000000000

Patch Set 1:

Use case I'm doing this for:  The critical path view changes when the thread selection in the control flow view changes.  Associating the entry list to a trace means having to rebuild the entry list whenever the process is changed, manually, since the default mechanism does not see a change of object (same trace).

Now just calling loadFor(object) allows to save the data for a process, so re-load it if re-selected and automatically triggers the buildThread for a new selection.

-------------------------------------
author: Brenden Conley
date: 2013-08-01 20:19:27.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/3089/ : SUCCESS

-------------------------------------
author: Luciana Barry
date: 2013-08-22 18:25:27.000000000

Patch Set 1: Code-Review-1

(4 comments)

Line:624, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> How do you cleanup the entry list related to an object?

Line:680, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> Could this be a problem if the object event list does not match the range of current fTrace?

Line:692, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> The zoom thread will refresh the arrows but the arrow links are related to the current fTrace... How to handle that? (maybe we need the fCurrentObject after all, see comment in loadCurrent).

Line:730, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> It seems to me, the use case would be a subclass that computes an entry list on its own, stores it with putEntryList then updates the view with loadFor(object). In that case, then if the object's entry list is not found, I don't think we want to start a BuildThread on the trace.
So I would leave loadTrace() unmodified, and just add loadFor(object) that would do nothing if the entry list is not found.
You probably don't need to store a fCurrentObject.
One thing to watch for, how to set the fStartTime and fEndTime for an object, if we don't know for what trace that object belongs?

-------------------------------------
author: Annalise Jimenez
date: 2013-08-23 13:15:44.000000000

Patch Set 1:

I see your point.  Actually, I'm trying to accomplish 2 distinct use cases in the same class:

1- 1 set of entries per trace, like the actual CFV and resources view

2- many sets of entries per trace, each associated with an object, like the upcoming critical path view.

It would probably be better to extend the time graph view for the second use case, with a buildThread per object instead of per trace and distinct [build|get]EventList and getLinkList taking an extra object as parameter.

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