TMF: Add possibility to set autoExpand level in time graph views

Change-Id: Idfeea90916fe1ebb7f60bb8a4893e730ef4a9544
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/36066
Tested-by: Hudson CI
lttng.kernel: Rename analysis packages and classes

There are two analyses in the kernel plugin right now, "kernel" and
"cpu usage". Simply rename the packages and classes to align them
better.

Change-Id: I9b7f86d2b9bad2d3d286d234eacea4ad51143bd4
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/36290
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
lttng: Add interface to abstract the event layout away

It would be possible to run the kernel analyses using events coming
from different tracers (or different versions of the same tracer).
This adds a IKernelAnalysisEventLayout, which specifies know concepts
in the Linux kernel, and the "support implementation" of each tracer
(or version) can extend it.

This will allow re-using the same modules and state providers, no matter
which actual tracer took the kernel trace. Also avoids having to define
separate trace types.

Also took the chance to rename some classes and packages to align them
better (i.e., the "CPU usage" and "kernel" analyses now use the same
naming scheme).

Change-Id: I0f073060071991e206011810bbb50dd826c688a8
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/36185
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
lttng: Fix system calls for LTTng 2.6 kernel traces

The "syscall entry" and "syscall exit" events were renamed in LTTng 2.6.
This patch adds a new trace layout, which extends the base LTTng definitions,
but updates the system call event names.

"syscall exit" also had to be changed to a prefix, because LTTng 2.6 now lists
the syscall name in exits too. We don't make use of it though, so it shouldn't
affect other tracers who don't.

Also required updating the CFV/RV to only display the non-prefix part of the
syscall name, no matter what layout is used underneat.

Change-Id: I9061b0dff92daa11894d951c09ed3dffe80e4d1b
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/36199
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Hudson CI
lttng: Experimental support for perf-CTF traces

Implement initial support for perf kernel traces in CTF format.
They can re-use the event layout capabilities introduced previously,
so that we can add this support without implementing a completely new
trace type and accompanying analyses.

Also rename the "LTTng Kernel" trace type and analysis to "Linux Kernel",
as they are now tracer-agnostic.

The perf-in-CTF format is not set in stone yet, so the settings used
here will most probably have to be updated in the future.

Change-Id: I099f6e21caf40b9bfbe1a305c51947f1a264124b
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/36200
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Hudson CI
Disable "warn for deprecated in deprecated code" warnings in test plugins

Change-Id: Ie22c99b600e0c6c162e94cd6f7d62cc311bffb3c
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/36248
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
tmf: Consolidate constructors in TmfExperiment

Change-Id: I3844cde0e651052b626eeeb90e367a03b1743a4d
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/36207
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
tmf: Move TmfExperiment to its own package

With many experiment-specific concepts, and more on the way, it's
making more sense to put TmfExperiment in its own package.

Change-Id: I1ae03f693b075dd6e521fc20fb22d70b0c619551
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/36208
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
ctf: Use new location for the test traces

Simply change them from .../test-traces/ to .../test-traces/ctf/
We will eventually put other trace types there (pcap for instance),
so it would make it a bit cleaner to have each in their own directory.

Change-Id: Ie5ce2098e47a65872759d99a359c20219e6710b5
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/36249
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
tmf: Add some nonNull annotation to the tmf.core.analysis package

And some more of those where required.

Change-Id: I369b0c5a0a2db8b3fccc6f6b97a2ba272b14fb28
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/35752
Tested-by: Hudson CI
tmf: Consolidate constructors in TmfEvent

The default constructor can be used by the ITmfEvent extension
point, so should remain available, but should not be used by
normal code.

Change-Id: Id0e5e6d35d5593852b2a89672efea4fcbcd5b948
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf: Remove source and reference from ITmfEvent

Those two notions were originally meant to have every trace type give
them a specific meaning, but to have some "common" concepts tha
 would be shown in the default event table.

Now that we have the possibility to aggregate columns in the event
table from multiple trace types, there is no need for those vague
concepts anymore. Every trace is free to implement and show any
specific item it wants. The base interface should be for the absolute
minimum that is required by the framework.

In fact, the notions of "source" and "reference" already meant different
things for different trace types (the Source of a CTF event was the source
CPU, while the source of a pcap event was the source address). So these
should *not* be aggregated in the same event columns since they do not
represent the same concepts.

Note: For the trace types that did make use of the source and reference
fields, this patch simply adds new fields to those traces, with the
names "source" and "reference" for now. But now that they will be decoupled
from the interface, we will be free to rename them accordingly.

Change-Id: I84f9729edee64233893779ca9c375a0a157bfc84
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf: Introduce the core concept of event criterion

A criterion (plural: criteria), in the sense of a "characterizing mark
of something", is a piece of information that can be extracted, directly
or indirectly, from a trace event.

Simple examples could be timestamp, or event fields. But it could also
be something like a state system request, at the timestamp of the given
event.

This patch introduces the base ITmfEventCriterion interface, some basic
criterion implementations, and simplifies the TmfEventTableColumns to
use criteria instead, since part of it is now redundant.

Change-Id: Ib045439d6084a6e6c7c276f1eddccfb13fe01be0
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf: Remove the ITmfEventTableColumns extension point

Add a getCriteria() method in ITmfTrace, which allows trace types
to define which criteria can be relevant for their own events.

This becomes redundant with the ITmfEventTableColumn extension point:
now that we build columns directly from criteria, instead of reading
extension point data the TmfEventsEditor can simply call
trace.getCriteria() instead. The trace type is already defined in a
core extension point, so we'll pass the criteria information through
that now.

The combination of careful equals() methods in criteria, and the use
of a Set in the TmfEventsEditor, will allow "merging" criteria/columns
together, like was already the case.

Change-Id: Ic5b6126a50b1b1fdb4b2d5d23eb6a47a57555594
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
[WIP] tmf.ctf: Add a CPU criterion to for CTF traces

CTF events know the CPU they were taken on (previously saved in
event.getSource()). Now we can define a criterion to display it
in its own column in the event table.

Change-Id: I603cfd4cc4ca61964ec59ea17293900e7aa1f42a
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>