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
CommitLineData
3e97fbfa 1/*******************************************************************************
ed902a2b 2 * Copyright (c) 2012, 2015 Ericsson
3e97fbfa
AM
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
e363eae1 13package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
3e97fbfa 14
e894a508
AM
15import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
16import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
dfb27cee 17
d85d2a6d
AM
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 *
e363eae1 23 * @author Alexandre Montplaisir
d85d2a6d
AM
24 */
25@SuppressWarnings("javadoc")
6d9da7b0 26public interface StateValues {
3e97fbfa 27
3e97fbfa 28 /* Process status */
64522b6b
AM
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;
58d6fd45
MK
35 /**
36 * @since 1.0
37 */
a810c240 38 int PROCESS_STATUS_WAIT_UNKNOWN = 6;
64522b6b
AM
39
40 ITmfStateValue PROCESS_STATUS_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_UNKNOWN);
58d6fd45
MK
41 /**
42 * @since 1.0
43 */
a810c240 44 ITmfStateValue PROCESS_STATUS_WAIT_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_UNKNOWN);
64522b6b
AM
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);
dfb27cee 50
8140841e
MK
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);
dfb27cee 73
8140841e
MK
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);
3e97fbfa 80}
This page took 0.071272 seconds and 5 git commands to generate.