DESCRIPTION

TMF: Synchronize an experiment instead of collection of traces

That will make it compatible with streaming since one full trace does not
have to be read before the others. It will also accelerate the time necessary
to get results, as matches will be found earlier. The overhead of reading the
experiment instead of the traces decreases performance though.

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


COMMENTS

author: Annalise Jimenez
date: 2014-09-09 17:28:26.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-09-09 18:11:22.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-09-09 18:40:12.000000000

Patch Set 2: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/8857/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2014-09-10 21:17:04.000000000

Patch Set 2: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2014-09-10 21:55:29.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2014-09-17 19:44:32.000000000

Patch Set 2: Code-Review-1

(4 comments)

More fine-grained synchronization is always good. Some comments on other things.

Line:47, lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/perf/org/eclipse/linuxtools/lttng2/kernel/core/tests/perf/event/matching/TraceSynchronizationBenchmark.java -> Is there a particular reason for this? There is also TmfExperiment.DEFAULT_INDEX_PAGE_SIZE for when you don't care.

Line:59, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/matching/TmfEventMatching.java -> unrelated to this patch, but a static field should not start with f..., it's not an instance field. This should be called MATCH_DEFINITIONS or such.

Line:75, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/matching/TmfEventMatching.java -> woah, you store the external collection directly, this is potentially dangerous! You should do a shallow copy here (and also maybe "unpack" the experiments at this stage, see comment below).

Line:91, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/matching/TmfEventMatching.java -> wow, this is hard to understand :P

I assume it makes sense... You don't want to include the experiments, you just want the "real" traces, so you unpack all experiments.

But in that case, why not just do this unpacking when you write into fTraces instead? So this method can remain a simple getter. Although if it's exposed publicly, the collection should be either synchronized or Immutable

-------------------------------------
author: Annalise Jimenez
date: 2014-09-18 20:41:12.000000000

Patch Set 2:

(1 comment)

Line:91, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/matching/TmfEventMatching.java -> Actually, it's 2 different things:

fTraces: contains the traces that were asked to be synchronized, so it includes experiment and it is on those traces that the event requets will be sent

getTraces(): returns the list of unpacked traces, so there is no experiment left at this point, but then maybe this method name is misleading and I should have 2 getters, one for the traces asked to be synchronized, and one for simple traces (no experiments).

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