os.linux: Correctly model each CPU's run queue
[deliverable/tracecompass.git] / analysis / org.eclipse.tracecompass.analysis.os.linux.core / src / org / eclipse / tracecompass / analysis / os / linux / core / kernel / StateValues.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2015 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Alexandre Montplaisir - Initial API and implementation
11 ******************************************************************************/
12
13 package org.eclipse.tracecompass.analysis.os.linux.core.kernel;
14
15 import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
16 import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
17
18 /**
19 * State values that are used in the kernel event handler. It's much better to
20 * use integer values whenever possible, since those take much less space in the
21 * history file.
22 *
23 * @author Alexandre Montplaisir
24 * @noimplement This interface is not intended to be implemented by clients.
25 * @since 2.0
26 */
27 @SuppressWarnings("javadoc")
28 public interface StateValues {
29
30 /* Process status */
31 int PROCESS_STATUS_UNKNOWN = 0;
32 int PROCESS_STATUS_WAIT_BLOCKED = 1;
33 int PROCESS_STATUS_RUN_USERMODE = 2;
34 int PROCESS_STATUS_RUN_SYSCALL = 3;
35 int PROCESS_STATUS_INTERRUPTED = 4;
36 int PROCESS_STATUS_WAIT_FOR_CPU = 5;
37 int PROCESS_STATUS_WAIT_UNKNOWN = 6;
38
39 ITmfStateValue PROCESS_STATUS_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_UNKNOWN);
40 ITmfStateValue PROCESS_STATUS_WAIT_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_UNKNOWN);
41 ITmfStateValue PROCESS_STATUS_WAIT_BLOCKED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_BLOCKED);
42 ITmfStateValue PROCESS_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_USERMODE);
43 ITmfStateValue PROCESS_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_SYSCALL);
44 ITmfStateValue PROCESS_STATUS_INTERRUPTED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_INTERRUPTED);
45 ITmfStateValue PROCESS_STATUS_WAIT_FOR_CPU_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_FOR_CPU);
46
47 /* CPU Status */
48 int CPU_STATUS_IDLE = 0;
49 /**
50 * Soft IRQ raised, could happen in the CPU attribute but should not since
51 * this means that the CPU went idle when a softirq was raised.
52 */
53 int CPU_STATUS_SOFT_IRQ_RAISED = (1 << 0);
54 int CPU_STATUS_RUN_USERMODE = (1 << 1);
55 int CPU_STATUS_RUN_SYSCALL = (1 << 2);
56 int CPU_STATUS_SOFTIRQ = (1 << 3);
57 int CPU_STATUS_IRQ = (1 << 4);
58
59 ITmfStateValue CPU_STATUS_IDLE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IDLE);
60 ITmfStateValue CPU_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_USERMODE);
61 ITmfStateValue CPU_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_SYSCALL);
62 ITmfStateValue CPU_STATUS_IRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IRQ);
63 ITmfStateValue CPU_STATUS_SOFTIRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFTIRQ);
64
65 /** Soft IRQ is raised, CPU is in user mode */
66 ITmfStateValue SOFT_IRQ_RAISED_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED);
67
68 /** If the softirq is running and another is raised at the same time. */
69 ITmfStateValue SOFT_IRQ_RAISED_RUNNING_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED | CPU_STATUS_SOFTIRQ);
70 }
This page took 0.034111 seconds and 5 git commands to generate.