linux/lttng: Fix return type and names of layout's network events
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.kernel.core / src / org / eclipse / tracecompass / internal / lttng2 / kernel / core / trace / layout / LttngEventLayout.java
index e79dd8f1998076efda73724682e34a0e6b10fc30..f46363ee84307ae11945bffc46716b35f933c8fe 100644 (file)
@@ -13,6 +13,7 @@
 package org.eclipse.tracecompass.internal.lttng2.kernel.core.trace.layout;
 
 import java.util.Collection;
+import java.util.Collections;
 
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
@@ -81,6 +82,7 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
     private static final String CHILD_COMM = "child_comm";
     private static final String CHILD_TID = "child_tid";
     private static final String PRIO = "prio";
+    private static final String PREV_PRIO = "prev_prio";
     private static final String NEXT_PRIO = "next_prio";
     private static final String NEW_PRIO = "newprio";
     private static final String COMM = "comm";
@@ -104,6 +106,17 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
     private static final String RQ_SECTOR= "rq_sector";
     private static final String NEXTRQ_SECTOR= "nextrq_sector";
 
+    /* Network events and field names */
+    private static final Collection<String> EVENTS_NETWORK_SEND = Collections.singleton("net_dev_queue");
+    private static final Collection<String> EVENTS_NETWORK_RECEIVE = Collections.singleton("netif_receive_skb");
+    private static final String[] TCP_SEQ_FIELD = { "transport_fields", "thtype_tcp", "seq" };
+    private static final String[] TCP_ACK_FIELD = { "transport_fields", "thtype_tcp", "ack_seq" };
+    private static final String[] TCP_FLAGS_FIELD = { "transport_fields", "thtype_tcp", "flags" };
+
+    /* KVM events */
+    private static final Collection<String> KVM_ENTRY_EVENTS = Collections.singleton("kvm_entry");
+    private static final Collection<String> KVM_EXIT_EVENTS = Collections.singleton("kvm_exit");
+
     /** All instances are the same. Only provide a static instance getter */
     protected LttngEventLayout() {
     }
@@ -290,6 +303,11 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
         return NEW_PRIO;
     }
 
+    @Override
+    public String fieldPrevPrio() {
+        return PREV_PRIO;
+    }
+
     @Override
     public String fieldNextPrio() {
         return NEXT_PRIO;
@@ -467,4 +485,42 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
         return DISKNAME;
     }
 
+    @Override
+    public Collection<String> eventsNetworkSend() {
+        return EVENTS_NETWORK_SEND;
+    }
+
+    @Override
+    public Collection<String> eventsNetworkReceive() {
+        return EVENTS_NETWORK_RECEIVE;
+    }
+
+    @Override
+    public String @NonNull [] fieldPathTcpSeq() {
+        return TCP_SEQ_FIELD;
+    }
+
+    @Override
+    public String @NonNull [] fieldPathTcpAckSeq() {
+        return TCP_ACK_FIELD;
+    }
+
+    @Override
+    public String @NonNull [] fieldPathTcpFlags() {
+        return TCP_FLAGS_FIELD;
+    }
+
+    // ------------------------------------------------------------------------
+    // VirtualMachine events : kvm entry/exit events
+    // ------------------------------------------------------------------------
+
+    @Override
+    public @NonNull Collection<@NonNull String> eventsKVMEntry() {
+        return KVM_ENTRY_EVENTS;
+    }
+
+    @Override
+    public @NonNull Collection<@NonNull String> eventsKVMExit() {
+        return KVM_EXIT_EVENTS;
+    }
 }
This page took 0.03048 seconds and 5 git commands to generate.