Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Montplaisir2014-11-06 19:40:08 +0000
committerAlexandre Montplaisir2014-11-21 00:20:25 +0000
commite1de2fd4dcb1caa750ecc4a25f5fa0033c082f78 (patch)
treebc6ac9a30288e3a66c4fdff4dd405d5b63120d76 /org.eclipse.tracecompass.lttng2.kernel.ui
parentb499523aa24716e8dcc910f4f6281a09553c8b62 (diff)
downloadorg.eclipse.tracecompass-e1de2fd4dcb1caa750ecc4a25f5fa0033c082f78.tar.gz
org.eclipse.tracecompass-e1de2fd4dcb1caa750ecc4a25f5fa0033c082f78.tar.xz
org.eclipse.tracecompass-e1de2fd4dcb1caa750ecc4a25f5fa0033c082f78.zip
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> Reviewed-on: https://git.eclipse.org/r/36131 Tested-by: Hudson CI Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Diffstat (limited to 'org.eclipse.tracecompass.lttng2.kernel.ui')
-rw-r--r--org.eclipse.tracecompass.lttng2.kernel.ui/src/org/eclipse/tracecompass/internal/lttng2/kernel/ui/viewers/events/LttngEventTableColumns.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.tracecompass.lttng2.kernel.ui/src/org/eclipse/tracecompass/internal/lttng2/kernel/ui/viewers/events/LttngEventTableColumns.java b/org.eclipse.tracecompass.lttng2.kernel.ui/src/org/eclipse/tracecompass/internal/lttng2/kernel/ui/viewers/events/LttngEventTableColumns.java
index 0eb5f98284..2528b87b81 100644
--- a/org.eclipse.tracecompass.lttng2.kernel.ui/src/org/eclipse/tracecompass/internal/lttng2/kernel/ui/viewers/events/LttngEventTableColumns.java
+++ b/org.eclipse.tracecompass.lttng2.kernel.ui/src/org/eclipse/tracecompass/internal/lttng2/kernel/ui/viewers/events/LttngEventTableColumns.java
@@ -16,6 +16,7 @@ import java.util.Collection;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.ctf.core.event.CtfTmfEvent;
import org.eclipse.tracecompass.tmf.ui.viewers.events.columns.ITmfEventTableColumns;
import org.eclipse.tracecompass.tmf.ui.viewers.events.columns.TmfEventTableColumn;
@@ -49,7 +50,10 @@ public class LttngEventTableColumns implements ITmfEventTableColumns {
@Override
public String getItemString(ITmfEvent event) {
- String ret = event.getReference();
+ if (!(event instanceof CtfTmfEvent)) {
+ return EMPTY_STRING;
+ }
+ String ret = ((CtfTmfEvent) event).getReference();
return (ret == null ? EMPTY_STRING : ret);
}

Back to the top