ctf: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.lttng2.kernel.core / src / org / eclipse / tracecompass / internal / lttng2 / kernel / core / trace / layout / LttngEventLayout.java
index 20443e86c78a451814768cfe0b278d1ace95d22f..13a9fbf62b2a610064ca50b8cdd2c853514c7bb8 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2014 Ericsson
+ * Copyright (c) 2012, 2015 Ericsson
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
 
 package org.eclipse.tracecompass.internal.lttng2.kernel.core.trace.layout;
 
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
 import java.util.Collection;
 
 import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
 
 import com.google.common.collect.ImmutableList;
 
 /**
- * This file defines all the known event and field names for LTTng 2.0 kernel
- * traces.
+ * This file defines all the known event and field names for LTTng kernel
+ * traces, for versions of lttng-modules up to 2.5.
  *
  * These should not be externalized, since they need to match exactly what the
  * tracer outputs. If you want to localize them in a view, you should do a
@@ -32,24 +35,25 @@ import com.google.common.collect.ImmutableList;
 public class LttngEventLayout implements IKernelAnalysisEventLayout {
 
     /* Event names */
-    private static final String EXIT_SYSCALL = "exit_syscall";
     private static final String IRQ_HANDLER_ENTRY = "irq_handler_entry";
     private static final String IRQ_HANDLER_EXIT = "irq_handler_exit";
     private static final String SOFTIRQ_ENTRY = "softirq_entry";
     private static final String SOFTIRQ_EXIT = "softirq_exit";
     private static final String SOFTIRQ_RAISE = "softirq_raise";
     private static final String SCHED_SWITCH = "sched_switch";
+    private static final String SCHED_PI_SETPRIO = "sched_pi_setprio";
 
-    @SuppressWarnings("null")
-    private static final @NonNull Collection<String> SCHED_WAKEUP_EVENTS = ImmutableList.of("sched_wakeup", "sched_wakeup_new");
+    private static final Collection<String> SCHED_WAKEUP_EVENTS =
+            checkNotNull(ImmutableList.of("sched_wakeup", "sched_wakeup_new"));
 
     private static final String SCHED_PROCESS_FORK = "sched_process_fork";
     private static final String SCHED_PROCESS_EXIT = "sched_process_exit";
     private static final String SCHED_PROCESS_FREE = "sched_process_free";
     private static final String STATEDUMP_PROCESS_STATE = "lttng_statedump_process_state";
 
-    private static final String SYSCALL_PREFIX = "sys_";
-    private static final String COMPAT_SYSCALL_PREFIX = "compat_sys_";
+    private static final String SYSCALL_ENTRY_PREFIX = "sys_";
+    private static final String COMPAT_SYSCALL_ENTRY_PREFIX = "compat_sys_";
+    private static final String SYSCALL_EXIT_PREFIX = "exit_syscall";
 
     /* Field names */
     private static final String IRQ = "irq";
@@ -62,9 +66,12 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
     private static final String PARENT_TID = "parent_tid";
     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 NEXT_PRIO = "next_prio";
+    private static final String NEW_PRIO = "newprio";
 
     /** All instances are the same. Only provide a static instance getter */
-    private LttngEventLayout() {
+    protected LttngEventLayout() {
     }
 
     private static final IKernelAnalysisEventLayout INSTANCE = new LttngEventLayout();
@@ -115,6 +122,11 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
         return SCHED_SWITCH;
     }
 
+    @Override
+    public String eventSchedPiSetprio() {
+        return SCHED_PI_SETPRIO;
+    }
+
     @Override
     public Collection<String> eventsSchedWakeup() {
         return SCHED_WAKEUP_EVENTS;
@@ -136,22 +148,23 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
     }
 
     @Override
-    public String eventStatedumpProcessState() {
+    public @NonNull String eventStatedumpProcessState() {
         return STATEDUMP_PROCESS_STATE;
     }
-    @Override
-    public String eventSyscallExit() {
-        return EXIT_SYSCALL;
-    }
 
     @Override
     public String eventSyscallEntryPrefix() {
-        return SYSCALL_PREFIX;
+        return SYSCALL_ENTRY_PREFIX;
     }
 
     @Override
     public String eventCompatSyscallEntryPrefix() {
-        return COMPAT_SYSCALL_PREFIX;
+        return COMPAT_SYSCALL_ENTRY_PREFIX;
+    }
+
+    @Override
+    public String eventSyscallExitPrefix() {
+        return SYSCALL_EXIT_PREFIX;
     }
 
     // ------------------------------------------------------------------------
@@ -208,4 +221,19 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
         return CHILD_TID;
     }
 
+    @Override
+    public String fieldPrio() {
+        return PRIO;
+    }
+
+    @Override
+    public String fieldNewPrio() {
+        return NEW_PRIO;
+    }
+
+    @Override
+    public String fieldNextPrio() {
+        return NEXT_PRIO;
+    }
+
 }
This page took 0.029523 seconds and 5 git commands to generate.