IKernelAnalysisEventLayout: add fieldPrevPrio() method
authorRaphaël Beamonte <raphael.beamonte@gmail.com>
Tue, 12 Apr 2016 17:46:32 +0000 (13:46 -0400)
committerAlexandre Montplaisir <alexmonthy@efficios.com>
Wed, 13 Apr 2016 18:02:32 +0000 (14:02 -0400)
Adds a fieldPrevPrio() method in the layout to access the
priority of the previous process. Up to now, we could access
the previous process' name, but its priority can be useful.

Change-Id: I52c9ae1f3ba377139702e8cd4a6aad75cac7757c
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Reviewed-on: https://git.eclipse.org/r/70503
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Alexandre Montplaisir <alexmonthy@efficios.com>
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/DefaultEventLayout.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/trace/layout/LttngEventLayout.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/trace/layout/PerfEventLayout.java

index 6d1d709c691f99cfe17315ca6602589b99fb4845..f8d249d97dc24056ec27a0911c1f955342ff107e 100644 (file)
@@ -93,6 +93,7 @@ public class DefaultEventLayout implements IKernelAnalysisEventLayout {
     private static final String CHILD_TID = "child_tid"; //$NON-NLS-1$
     private static final String PRIO = "prio"; //$NON-NLS-1$
     private static final String NEW_PRIO = "newprio"; //$NON-NLS-1$
+    private static final String PREV_PRIO = "prev_prio"; //$NON-NLS-1$
     private static final String NEXT_PRIO = "next_prio"; //$NON-NLS-1$
     private static final String COMM = "comm"; //$NON-NLS-1$
     private static final String NAME = "name"; //$NON-NLS-1$
@@ -287,6 +288,14 @@ public class DefaultEventLayout implements IKernelAnalysisEventLayout {
         return NEW_PRIO;
     }
 
+    /**
+     * @since 2.0
+     */
+    @Override
+    public String fieldPrevPrio() {
+        return PREV_PRIO;
+    }
+
     /** @since 1.0 */
     @Override
     public String fieldNextPrio() {
index 5270f025e7ba87ff7b592718c2cdaf599d027743..17e271d2007bdd7eb29a84bb4251b891063cea12 100644 (file)
@@ -489,6 +489,15 @@ public interface IKernelAnalysisEventLayout {
      */
     String fieldNewPrio();
 
+    /**
+     * The field with the prev priority. This is used in the scheduler's switch
+     * event to show the priority of the thread being scheduled out.
+     *
+     * @return the name of the field with the priority of the previous thread
+     * @since 2.0
+     */
+    String fieldPrevPrio();
+
     /**
      * The field with the next priority. This is used in the scheduler's switch
      * event to show the priority of the next thread or process.
index e79dd8f1998076efda73724682e34a0e6b10fc30..40a86f5967268501a427d6dbf4b09c5ea0f7b932 100644 (file)
@@ -81,6 +81,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";
@@ -290,6 +291,11 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
         return NEW_PRIO;
     }
 
+    @Override
+    public String fieldPrevPrio() {
+        return PREV_PRIO;
+    }
+
     @Override
     public String fieldNextPrio() {
         return NEXT_PRIO;
index 6c2f69036d8bd1a80461d5aacea413639d3ccae8..6b83e5aea64ca79ab01b4621c9b4ae122d31a49e 100644 (file)
@@ -236,6 +236,11 @@ public class PerfEventLayout implements IKernelAnalysisEventLayout {
         return "newprio"; //$NON-NLS-1$
     }
 
+    @Override
+    public String fieldPrevPrio() {
+        return "prev_prio"; //$NON-NLS-1$
+    }
+
     @Override
     public String fieldNextPrio() {
         return "next_prio"; //$NON-NLS-1$
This page took 0.029967 seconds and 5 git commands to generate.