os.linux: make SoftIrqs support being raised while executing.
[deliverable/tracecompass.git] / analysis / org.eclipse.tracecompass.analysis.os.linux.core / src / org / eclipse / tracecompass / analysis / os / linux / core / kernelanalysis / StateValues.java
index ff3d5ee5c90504432104251ce711731b5bf3abed..26e666edcb3d1c89212590cdda9c1e1b274ae2ff 100644 (file)
@@ -25,19 +25,6 @@ import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
 @SuppressWarnings("javadoc")
 public interface StateValues {
 
-    /* CPU Status */
-    int CPU_STATUS_IDLE = 0;
-    int CPU_STATUS_RUN_USERMODE = 1;
-    int CPU_STATUS_RUN_SYSCALL = 2;
-    int CPU_STATUS_IRQ = 3;
-    int CPU_STATUS_SOFTIRQ = 4;
-
-    ITmfStateValue CPU_STATUS_IDLE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IDLE);
-    ITmfStateValue CPU_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_USERMODE);
-    ITmfStateValue CPU_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_SYSCALL);
-    ITmfStateValue CPU_STATUS_IRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IRQ);
-    ITmfStateValue CPU_STATUS_SOFTIRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFTIRQ);
-
     /* Process status */
     int PROCESS_STATUS_UNKNOWN = 0;
     int PROCESS_STATUS_WAIT_BLOCKED = 1;
@@ -61,8 +48,33 @@ public interface StateValues {
     ITmfStateValue PROCESS_STATUS_INTERRUPTED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_INTERRUPTED);
     ITmfStateValue PROCESS_STATUS_WAIT_FOR_CPU_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_FOR_CPU);
 
-    /* SoftIRQ-specific stuff. -1: null/disabled, >= 0: running on that CPU */
-    int SOFT_IRQ_RAISED = -2;
+    /* CPU Status */
+    int CPU_STATUS_IDLE = 0;
+    /**
+     * Soft IRQ raised, could happen in the CPU attribute but should not since
+     * this means that the CPU went idle when a softirq was raised.
+     *
+     * @since 2.0
+     */
+    int CPU_STATUS_SOFT_IRQ_RAISED = (1 << 0);
+    int CPU_STATUS_RUN_USERMODE = (1 << 1);
+    int CPU_STATUS_RUN_SYSCALL = (1 << 2);
+    int CPU_STATUS_SOFTIRQ = (1 << 3);
+    int CPU_STATUS_IRQ = (1 << 4);
+
+    ITmfStateValue CPU_STATUS_IDLE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IDLE);
+    ITmfStateValue CPU_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_USERMODE);
+    ITmfStateValue CPU_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_SYSCALL);
+    ITmfStateValue CPU_STATUS_IRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IRQ);
+    ITmfStateValue CPU_STATUS_SOFTIRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFTIRQ);
+
+    /** Soft IRQ is raised, CPU is in user mode */
+    ITmfStateValue SOFT_IRQ_RAISED_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED);
 
-    ITmfStateValue SOFT_IRQ_RAISED_VALUE = TmfStateValue.newValueInt(SOFT_IRQ_RAISED);
+    /**
+     * If the softirq is running and another is raised at the same time.
+     *
+     * @since 2.0
+     */
+    ITmfStateValue SOFT_IRQ_RAISED_RUNNING_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED | CPU_STATUS_SOFTIRQ);
 }
This page took 0.025921 seconds and 5 git commands to generate.