DESCRIPTION

tmf: Introduction of ITmfHistoryBuilder interface and factory

This interface is used to build state system histories using the
TmfStateSystemFactory. Using this interface it is easy to
cancel the building of state system histories from the analysis
framework.

Change-Id: Ibb52b20b6fdb16b665ad318cda04cf92d19ccf72
Signed-off-by: Ricky Reeves <Meredith xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-12-06 16:15:00.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2013-12-06 16:46:06.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2013-12-09 22:25:39.000000000

Patch Set 1: Code-Review-1

I looked at this a bit, and to be honest, I really don't like it ;D

We've been iterating for a bit on how to handle the state systems with the new analysis framework. With the most recent discussion I had with Geneviève, we were at the point where the initial idea of "considering the state system like an analysis module of its own" ended up being the most favorable after all.

The role of the HistoryBuilder has been to handle the construction of a state system, which means handling when it was started (the first time a TimeRangeUpdated signal is received), when it was finished (.waitUntilBuilt()) and when it was cancelled (when the trace was closed while it was building). Turns out that now, the analysis framework can also do those things (decide when a task has to begin once a trace is ready, notify when it's complete, and handle how it can be cancelled). This means the HistoryBuilder itself is now redundant with the analysis modules.

I didn't like the idea of having the state-system-as-an-analysis at first, because it tightly coupled the notion of state system and analysis. I was also concerned by the case where an "analysis" might want more than one state system (like is the case with statistics at the moment). But now we've come full-circle, and now that nested analyzes are a thing, it seems it was the "least bad" idea after all.

We can have a base class for a one-state-system-analysis, which simple analyzes can extend (like is done for the LTTng-Kernel on in https://git.eclipse.org/r/#/c/19432/ ). And for more involved analyzes which require more than one, they can have 2+ "child" analyzes which will each build the SS they need.

In summary, now that we have a working analysis framework set in place, we could just scrap HistoryBuilder, and move its functionality to an analysis module. Instead of extending its reach furthermore, adding an interface, adding subclasses-per-backend, etc.

Although thanks Meredith Scott for this prototyping work, it really gives us a clear view of what the "other path" looks like, so that we can take a better decision.

-------------------------------------
author: Ricky Reeves
date: 2013-12-10 13:16:37.000000000

Patch Set 1:

Thanks for reviewing and giving valuable insights.

Too bad that you don't like it. It does what it advertises (cancelling of requests), it abstracts the functionality in small classes and keeps the possibility to build a state system history without an analysis module. The latter could be useful in some cases (not just tests).

I understand that the TmfStateSystemAnalysisModule can be used to replace the TmfStateSystemFactory and HistoryBuilder. Merging this functionality in the state system module makes sense and avoids having another interface and implementation for a history builder. Less API to maintain.

Since I invested already some time I'd like to finish the update and hence I will upload a new version of the patch set that should be inline what you were suggesting.

Meredith Scott

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