tmf: add (internal) API for handling name clashes during import

Change-Id: Ice0d488b313f7c3e303e953b80f018f4c906ebf5
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/36227
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
tmf: fix IllegalArgumentException when doing auto-detection

with trace type that doesn't exist (anymore). Since it is determined
during runtime which trace types exists this should not throw
an exception.

Change-Id: I0fa7a01351331b350eb2da85ab9624e96346cb2c
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/36228
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
tmf: Bug 434646: Control Flow view not cleared when opening UST trace

Change-Id: I691ac18b2c6fb14b3eba5e7719822ecb1fe57698
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/36170
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
TMF: Synchronize an experiment instead of collection of traces

That will make it compatible with streaming since one full trace does not
have to be read before the others. It will also accelerate the time necessary
to get results, as matches will be found earlier. The overhead of reading the
experiment instead of the traces decreases performance though.

Change-Id: I7c94c21e63781b2cae0faead915be8959170a992
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/35350
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
lttng/live: get last timestamp first

Change-Id: I0c3989ee4a421b0555adc873e44d3771f0a599cc
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/36250
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>
WIP tmf: Remove filter IDs, use criteria instead

This reworks the Filter View and Event table to store/use
event criteria, instead of custom filter ID strings.

This allows filtering on any criteria without having to define
a specific Filter ID beforehand (should then work with user-
defined criteria).

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