DESCRIPTION

TMF: Correct bug when synchronizing more than 2 traces

Previously, when synchronizing more than 2 traces, it would return false
results when not all traces had a path to all others. Some timestamp transforms
need composition to be accurate wrt the reference trace

Change-Id: Ie71c4063970af5db1b1476d72351639342a149d8
Signed-off-by: Adonis Kirk xxx@xxx.xxx
Signed-off-by: Aryana Jones xxx@xxx.xxx


COMMENTS

author: Annalise Jimenez
date: 2014-08-18 16:05:41.000000000

Uploaded patch set 6.

-------------------------------------
author: Brenden Conley
date: 2014-08-18 17:54:03.000000000

Patch Set 6:

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

-------------------------------------
author: Brenden Conley
date: 2014-08-18 18:30:48.000000000

Patch Set 6: Verified+1

Build Successful 

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

-------------------------------------
author: Ricky Reeves
date: 2014-08-19 17:57:13.000000000

Patch Set 6:

Matthew could you please look at this patch?

-------------------------------------
author: Ivy Mitchell
date: 2014-08-20 17:49:20.000000000

Patch Set 6:

(2 comments)

Ok: the pro, this looks good, why did I not +1 it? right now (aug 20 2014) there is a new release branch being made, so I don't think it would be wise to submit this.

That being said, this patch does a lot of stuff, the syncgraph seems a little overkill to me, is there something internal to java that would do something similar? I see where you're getting at though, and I am asking a question not blocking you guys.

A few minor nits in my first pass, I will get back to this soon.

Line:24, lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/AllTests.java -> WHY?!!?!

Line:26, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/synchronization/TmfConstantTransform.java -> Not a fan of this name, could you make it more descriptive?

-------------------------------------
author: Adonis Kirk
date: 2014-08-20 18:17:48.000000000

Patch Set 6:

>  the syncgraph seems a little overkill to me

This is needed for proper computation of the overall transform from any given node. A graph is built where nodes represents hosts and edges are transforms. Two edges are added between each synchronized hosts, one direct with the transform, and reverse with the inverse transform. Any node can be selected as the root node. By composing transform from any node to the root node, the overall transform is obtained. The path returned is the shortest path, but not necessarily the best path in terms of precision. A graph structure is required to cover all cases that may occur in practice, because not all hosts are fully connected. Here is an example that was failing with the previous code: 

a -> b <- c

If the reference node was 'a', then the host 'c' was not synchronized.

There is know to our knowledge a graph data structure and algorithms included in the standard Java. A graph library could be used instead of having a small graph implementation. It is a matter of choice between having 10 lines of custom code that implements the very known Dijkstra's algorithm, or having another dependency on a third party library.

-------------------------------------
author: Ivy Mitchell
date: 2014-08-20 18:27:15.000000000

Patch Set 6:

Francis, that is beautiful and needs to be in the comments! ;)

-------------------------------------
author: Ivy Mitchell
date: 2014-08-20 18:28:25.000000000

Patch Set 6:

I meant Code comments (javadoc) sorry for the ambiguity

-------------------------------------
author: Annalise Jimenez
date: 2014-08-20 18:58:30.000000000

Patch Set 6:

(2 comments)

Ideally, if one of those library would already implement the Minimum Spanning Tree with WeightedGraphs, that would be the ideal choice, as that algorithm gives the optimal reference node and, thus, synchronization formula for each other node. But in the meantime, this trivial graph implementation does a good job of it.

Line:24, lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/AllTests.java -> alphabetical order of course! Before Alex gets his hand on this ;-)

Line:26, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/synchronization/TmfConstantTransform.java -> What name? ITmfTimestampTransformInternal? or TmfConstanTransform?

-------------------------------------
author: Ivy Mitchell
date: 2014-08-22 19:05:40.000000000

Patch Set 6:

(2 comments)

Line:24, lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/AllTests.java -> fine...

Line:26, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/synchronization/TmfConstantTransform.java -> ITmfTimestampTransformInternal ... is the internal really helping, from a programming pov, I think that detail doesn't help people.

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