DESCRIPTION

ctf: add accelerator for lttng vtid/procname context

This is needed by the call stack view, so we should be able to accelerate it.

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


COMMENTS

author: Ivy Mitchell
date: 2014-07-11 16:58:12.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2014-07-11 16:58:18.000000000

Patch Set 5:

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

-------------------------------------
author: Brenden Conley
date: 2014-07-11 17:23:40.000000000

Patch Set 5: Verified-1

Build Failed 

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

-------------------------------------
author: Annalise Jimenez
date: 2014-07-11 18:06:05.000000000

Patch Set 5: Code-Review-1

(7 comments)

Just went quickly through it and made a few comments.

Could you explain a bit more how this accelerate vtid/procname retrieval, as opposed to how it is now (I don't know this code at all).

Also, my main questions are about the contexts, with other contexts. What will happen to other contexts and if we have only one of vtid or procname.

Line:23, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/ICompositeDeclaration.java -> For a public interface, that's an awefully small javadoc ;-)

Line:28, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/types/composite/ContextVTidProcnameDecl.java -> Could add vpid to it also

Line:43, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/types/composite/ContextVTidProcnameDecl.java -> private or really package-private?

Line:100, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/types/composite/ContextVTidProcnameDecl.java -> So does this context need both vtid AND procname, so you won't use this declaration/definition, if say, you have only the vtid or the procname but not the other?

Also what happens to other contexts? pid here, perf counters, etc?

Line:177, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStream.java -> Missing javadoc

Line:216, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStream.java -> javadoc

and probably missing xxx@xxx.xxx annotation inside the javadoc?

Line:225, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStream.java -> What is a context in this context? As there are CTF contexts, trace reader contexts, TMFContexts, etc.

-------------------------------------
author: Ivy Mitchell
date: 2014-07-11 18:18:43.000000000

Patch Set 5:

(4 comments)

This code accelerated context (VTID and PROCNAME) acceleration by creating one object containing a byte array and an int instead of 20 objects ( 1 struct, one 32bit int, one array, 17 8bit ints ) and bulk reading as much as possible.

It's basically a hard coded shortcut for something where the signature matches.

Line:23, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/types/ICompositeDeclaration.java -> Got a point, thanks!

Line:28, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/types/composite/ContextVTidProcnameDecl.java -> That could be another patch :)

Line:100, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/types/composite/ContextVTidProcnameDecl.java -> It will not accelerate. The problem is that we accelerate here by avoiding generic field creation, so if we have a very common field combo, like event headers or this, we can accelerate it.

Line:225, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStream.java -> In ctf it is a ctf context, in tmf it is a tmf context

-------------------------------------
author: Annalise Jimenez
date: 2014-07-11 18:22:07.000000000

Patch Set 5:

But is this accelerator used if and only if you have both vtid and procname and nothing else?

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