DESCRIPTION

Add support for scoped event contexts.

Change-Id: I19f0ed63b494d6f27b434c58691ed428dc991911
Signed-off-by: Ivy Mitchell xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2012-10-09 20:22:24.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/314/ 

-------------------------------------
author: Brenden Conley
date: 2012-10-09 20:34:20.000000000

Patch Set 1: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/314/ : SUCCESS

-------------------------------------
author: Ricky Reeves
date: 2012-10-11 13:35:11.000000000

Patch Set 1: (4 inline comments)



Line:119, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java -> Update header to describe the difference to method getEventContext().

Line:137, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java -> I would remove the part "it is only called in ToString()" because this only true (for now) when using it integrated with TMF. Other users of CTF (standalone) might have a different use case of it.

Line:141, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java -> It looks good for me. However, I'm not very familiar with the internal CTF structures.  So, I trust your expertise and Alex' review :-)

Line:176, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java -> Is it possible to store the merged Context in a member variable so that it doesn't need to be rebuild everytime when there is a stream and event context?

-------------------------------------
author: Braxton Mccarthy
date: 2012-10-11 15:49:38.000000000

Patch Set 1: I would prefer that you didn't submit this

(4 inline comments)

some comments

Line:7, /COMMIT_MSG -> there should be no period at the end

Line:120, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java -> As we discussed, maybe the methods should be called getEventContext() and getFullContext() or something, to avoid confusion?

Line:141, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java -> Algo looks fine, but do you really need to use an Iterator? Couldn't you use for loops? like

for (Entry<String, Definition> entry : defs.entrySet()) { etc.

Line:176, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java -> AFAIUI, the event's context should be final once the event is initialized, so yes we could store that part in the event itself (one day it might be possible to make events immutable ;) )

But for the stream's context, it could change over time (if they get deactivated and whatnot) so we have to go check its contents every time.

@Matthew: would it be more efficient to deep-copy the event's context, then iterate over the stream's context to copy its contents?

-------------------------------------
author: Ivy Mitchell
date: 2012-10-23 19:18:56.000000000

Patch Set 1: (2 inline comments)

answered comments.

Line:120, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java -> I would rather not, the context is not as much full as it is correct. you only want the "Event context" if you are taking an event out of a stream

Line:176, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDefinition.java -> I am not sure honestly, and this is a rather rare case, what we are worried about is if there are contexts on both the event and the stream. I think the optimization would only be useful if users ask for it.

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