26e666edcb3d1c89212590cdda9c1e1b274ae2ff
[deliverable/tracecompass.git] / analysis / org.eclipse.tracecompass.analysis.os.linux.core / src / org / eclipse / tracecompass / analysis / os / linux / core / kernelanalysis / 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.kernelanalysis;
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 */
25 @SuppressWarnings("javadoc")
26 public interface StateValues {
27
28 /* Process status */
29 int PROCESS_STATUS_UNKNOWN = 0;
30 int PROCESS_STATUS_WAIT_BLOCKED = 1;
31 int PROCESS_STATUS_RUN_USERMODE = 2;
32 int PROCESS_STATUS_RUN_SYSCALL = 3;
33 int PROCESS_STATUS_INTERRUPTED = 4;
34 int PROCESS_STATUS_WAIT_FOR_CPU = 5;
35 /**
36 * @since 1.0
37 */
38 int PROCESS_STATUS_WAIT_UNKNOWN = 6;
39
40 ITmfStateValue PROCESS_STATUS_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_UNKNOWN);
41 /**
42 * @since 1.0
43 */
44 ITmfStateValue PROCESS_STATUS_WAIT_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_UNKNOWN);
45 ITmfStateValue PROCESS_STATUS_WAIT_BLOCKED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_BLOCKED);
46 ITmfStateValue PROCESS_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_USERMODE);
47 ITmfStateValue PROCESS_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_SYSCALL);
48 ITmfStateValue PROCESS_STATUS_INTERRUPTED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_INTERRUPTED);
49 ITmfStateValue PROCESS_STATUS_WAIT_FOR_CPU_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_FOR_CPU);
50
51 /* CPU Status */
52 int CPU_STATUS_IDLE = 0;
53 /**
54 * Soft IRQ raised, could happen in the CPU attribute but should not since
55 * this means that the CPU went idle when a softirq was raised.
56 *
57 * @since 2.0
58 */
59 int CPU_STATUS_SOFT_IRQ_RAISED = (1 << 0);
60 int CPU_STATUS_RUN_USERMODE = (1 << 1);
61 int CPU_STATUS_RUN_SYSCALL = (1 << 2);
62 int CPU_STATUS_SOFTIRQ = (1 << 3);
63 int CPU_STATUS_IRQ = (1 << 4);
64
65 ITmfStateValue CPU_STATUS_IDLE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IDLE);
66 ITmfStateValue CPU_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_USERMODE);
67 ITmfStateValue CPU_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_SYSCALL);
68 ITmfStateValue CPU_STATUS_IRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IRQ);
69 ITmfStateValue CPU_STATUS_SOFTIRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFTIRQ);
70
71 /** Soft IRQ is raised, CPU is in user mode */
72 ITmfStateValue SOFT_IRQ_RAISED_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED);
73
74 /**
75 * If the softirq is running and another is raised at the same time.
76 *
77 * @since 2.0
78 */
79 ITmfStateValue SOFT_IRQ_RAISED_RUNNING_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED | CPU_STATUS_SOFTIRQ);
80 }
This page took 0.041076 seconds and 5 git commands to generate.