XML state system: Add "eventName" to the current stateattribute types.

We already have the "eventName" as a type for statevalue, but sometimes we need
it as a valid stateattribute type as well, e.g., in counting the number of each
event type.

Change-Id: Ie699221d71cee1686c6865bcffc3b38a991a0731
Signed-off-by: Naser Ezzati <n.ezzati@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/36059
Tested-by: Hudson CI
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
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>
Reviewed-on: https://git.eclipse.org/r/36130
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
tmf: Add missing NonNull import to tmf.ui.tests

Change-Id: Iec621cb9eb70773e71433ebb7498d6329d7842ef
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/36374
Tested-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
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 that
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>
tmf.ctf: Rework the criteria of CTF traces

- Move the "channel" criterion from LttngKernel to CtfTmfTrace
  (it applies to any CTF trace).
- Add a CPU criterion 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>
tmf.analysis: Restore the "geCPU" for data-driven analyses

XML data-driven analyses used to use ITmfEvent.getSource() to get
the event's CPU. This was misleading, because trace types were free
to define "source" as something other than CPUs.

Now instead use a CpuCriterion to get the CPU of an event. This
should restore support for getting the CPU of CTF traces, as it
did before.

Change-Id: I88437b4a419e81aef36f2aa5298ff54f87242b23
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf: Make ITmfTrace.getCriteria() @NonNull

It's easier to deal with empty collections than dealing with
null/non-null references (addAll() and such).

Change-Id: I9e8d0091e099027b5da0c15881b73130b4ef2e9d
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf: Add a "Trace" Event Table column for experiments

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