DESCRIPTION

tmf: Provide a static method to retrieve state systems

This new method in TmfStateSystemAnalysisModule will:

- Null check the analysis module, so callers don't all have to do it.
- Start the execution of the module, if required (calling schedule()
  after it has already been started is a no-op).
- Avoid exposing a ITmfAnalysisModule object, which is Closeable
  because it holds disposable resources.

This fixes a bunch of the new potential leaks warnings (actually, it
isolates them in one place). Eventually the analysis module API might
have to be reworked, to either never expose the analysis module objects
publicly, or to separate the "accessor" objects from the ones holding
the resources.

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


COMMENTS

author: Braxton Mccarthy
date: 2014-07-14 20:27:08.000000000

Uploaded patch set 5.

-------------------------------------
author: Braxton Mccarthy
date: 2014-07-14 20:30:12.000000000

Patch Set 5:

Geneviève, any opinion on this? I think even after we unmake IAnalysisModule Closeable, just having the utility method will be useful (and it removes LoCs!)

-------------------------------------
author: Brenden Conley
date: 2014-07-14 20:40:51.000000000

Patch Set 5:

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

-------------------------------------
author: Annalise Jimenez
date: 2014-07-14 21:17:12.000000000

Patch Set 5: Code-Review+1

Yeah, ok. Presented this way, it is just a shortcut to schedule/initialize/get the state system, things that we do quite often. And one can still use a module's method if necessary, like for the CPU analysis. Ok, I am agree then

-------------------------------------
author: Brenden Conley
date: 2014-07-14 21:40:47.000000000

Patch Set 5: Verified+1

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2014-07-14 21:55:02.000000000

Patch Set 5: Code-Review+2

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