DESCRIPTION

TMF: Move has*Event(s) methods from CtfTmfTrace to an interface

This way, other trace classes may implement this interface and be queried on
the events it might contain. This will be useful for analysis who can query
traces to know whether or not they might contain the events it needs to
execute.

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


COMMENTS

author: Annalise Jimenez
date: 2014-03-07 13:55:17.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-03-07 13:55:23.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-03-07 14:38:06.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2014-03-07 20:39:31.000000000

Patch Set 2:

(2 comments)

Small things, and 2 questions:

* The Javadoc mentions this is only for knowing which events are available without reading the trace. I understand the use case, we want to avoid reading the trace if we can. But then why force it, if the trace wants to implement the interface by reading its contents (if it's known to be small traces for example), what's the hurt?

* Do we want to put this in a separate interface, or straight in ITmfTrace?

Line:20, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceWithPreDefinedEvents.java -> xxx@xxx.xxx

Line:38, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceWithPreDefinedEvents.java -> don't use public in interface, applies below too

-------------------------------------
author: Braxton Mccarthy
date: 2014-03-07 20:39:40.000000000

Patch Set 2: Code-Review-1

-------------------------------------
author: Annalise Jimenez
date: 2014-03-07 21:02:46.000000000

Patch Set 2:

We discussed it yesterday, 'we' don't want it in ITmfTrace (patchset 1 did that), because the method name is confusing, it's a bit weird to return true by default when actually you have no idea what events might be in the trace, so only trace types who want it may implement it.

Anyway, I wanted it in TmfTrace initially to avoid a 1-time cast, but that's ok, I'll cast anyway.

And indeed no animal dies if you read the whole trace, except that the reason why you call this method is usually because you are wondering whether you need to read the trace. Because if you can know right away that the ust memory allocation tracepoints are not there, then you will not read the trace to do a memory analysis.

I suppose I should document more the why you would call this method.

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