DESCRIPTION

[TMF] add pid to events.

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


COMMENTS

author: Brenden Conley
date: 2013-01-24 22:54:54.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2013-01-24 23:07:41.000000000

Patch Set 1: Verified

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2013-01-24 23:45:21.000000000

Patch Set 1: (9 inline comments)

A nice idea! Before we merge it though I think it will need:

* Unit tests (should be simple to add, our test traces are already LTTng traces).
* A prototype implementation, in a separate commit, of an Event view extension for kernel traces that adds a TID column and uses this value to populate its data.

Line:7, /COMMIT_MSG -> should be [lttng] in fact, since it affects the lttng package. maybe like:

lttng: Add PID getter to LTTng kernel events

Line:26, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/trace/CtfKernelEvent.java -> Could you write at least a one-line description? ;)

Line:50, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/trace/CtfKernelEvent.java -> Should document that this tries the context first, then does a state system query.

Line:57, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/trace/CtfKernelEvent.java -> this could be an int too. and could be declared inside the try {}

Line:66, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/trace/CtfKernelEvent.java -> I wouldn't printStackTrace for AttributeNotFound or TimeRange exceptions. If the state system isn't built yet, it should catch them silently and return -1 (that or wait until it's done building, but I don't think we want to do that).

The other two exception types shouldn't happen though, so printStackTrace is relevant.

Line:19, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/trace/CtfKernelItterator.java -> Description!

Line:29, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/trace/CtfKernelItterator.java -> It could take a CtfKernelTrace as parameter to enforce the right trace type.

Line:35, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/trace/CtfKernelItterator.java -> will "super.prio" refer to the right thing here?

Line:38, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/trace/CtfKernelItterator.java -> I would suggest renaming CtfIterator.getTmfTrace() to .getTrace(), and extending it in here to return a CtfKernelTrace. So this cast becomes unnecessary.

-------------------------------------
author: Dax Sharp
date: 2013-01-25 15:14:10.000000000

Patch Set 1: (1 inline comment)

I am a CTF newbie, but why is the kernel iterator necessary?
Also see my comment about the typo :)

Line:23, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/trace/CtfKernelItterator.java -> Itterator should be Iterator

-------------------------------------
author: Braxton Mccarthy
date: 2013-01-25 15:37:35.000000000

Patch Set 1:

> I am a CTF newbie, but why is the kernel iterator necessary?

So that the events that are read are instantiated as CtfKernelEvents (so that we can use getPID()).

Although right now, nothing will create CtfKernlIterator's... I think we'll need to rework the IteratorManager part to allow for custom types.

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