DESCRIPTION

tmf: Move creation of timer to init method instead of constructor

By the doing this, the timer is not running when creating trace
instances for validation.

Also, cancel timer when trace is disposed.

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


COMMENTS

author: Ricky Reeves
date: 2014-01-27 18:14:43.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2014-01-27 19:06:11.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2014-01-27 19:21:44.000000000

Patch Set 3: Verified-1

Build Failed 

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

-------------------------------------
author: Brenden Conley
date: 2014-01-27 19:33:47.000000000

Patch Set 3: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2014-01-27 19:45:16.000000000

Patch Set 3: Verified-1

Build Failed 

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

-------------------------------------
author: Braxton Mccarthy
date: 2014-01-27 20:18:19.000000000

Patch Set 3: Code-Review-1

(1 comment)

Will also need to be rebased to latest master.

Line:132, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java -> One of the constructors calls init() directly, so this could still create a thread at construction. Or are we sure that one is never called from "fake traces"? I think it'd be safer with the lazy-init that was done in the previous version.

getTimer() and dispose() could both be synchronized (so it synchronizes on "this"), it doesn't really have anything to do with fLock.

-------------------------------------
author: Ricky Reeves
date: 2014-01-28 19:43:29.000000000

Patch Set 3:

(1 comment)

I'll rebase it. See inline comment.

Line:132, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java -> I cannot synchronize just on this object for dispose() and init() because sendRequest is using the timer too 

If someone calls init() then the trace is not a "fake" trace anymore. Trace used for validation don't need the timer, executor etc and therefore won't call init().

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