88c15fdb236141e7edd4e09cdad4e5ba20ffbba9
[deliverable/tracecompass.git] / org.eclipse.tracecompass.analysis.os.linux.core / src / org / eclipse / tracecompass / internal / analysis / os / linux / core / kernelanalysis / LinuxValues.java
1 /*******************************************************************************
2 * Copyright (c) 2015 EfficiOS Inc., Alexandre Montplaisir
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which 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.internal.analysis.os.linux.core.kernelanalysis;
14
15 /**
16 * Definitions of values used in the Linux kernel code.
17 *
18 * Instead of using "magic numbers" in state providers, the definitions should
19 * be added here first.
20 *
21 * @author Alexandre Montplaisir
22 */
23 @SuppressWarnings("javadoc")
24 public interface LinuxValues {
25
26 /*
27 * Process states found in scheduler events.
28 *
29 * From include/linux/sched.h
30 *
31 * #define TASK_RUNNING 0
32 * #define TASK_INTERRUPTIBLE 1
33 * #define TASK_UNINTERRUPTIBLE 2
34 * #define __TASK_STOPPED 4
35 * #define __TASK_TRACED 8
36 * #define EXIT_DEAD 16
37 * #define EXIT_ZOMBIE 32
38 * #define EXIT_TRACE (EXIT_ZOMBIE | EXIT_DEAD)
39 * #define TASK_DEAD 64
40 * #define TASK_WAKEKILL 128
41 * #define TASK_WAKING 256
42 * #define TASK_PARKED 512
43 * #define TASK_STATE_MAX 1024
44 */
45 int TASK_STATE_RUNNING = 0;
46 int TASK_STATE_MAX = 1024;
47
48 /*
49 * Process statuses, used in LTTng statedump events.
50 *
51 * This is LTTng-specific, but the statedump are handled at this level, so
52 * it makes sense to add those definitions here.
53 *
54 * Taken from lttng-module's lttng-statedump-impl.c:
55 *
56 * enum lttng_process_status {
57 * LTTNG_UNNAMED = 0,
58 * LTTNG_WAIT_FORK = 1,
59 * LTTNG_WAIT_CPU = 2,
60 * LTTNG_EXIT = 3,
61 * LTTNG_ZOMBIE = 4,
62 * LTTNG_WAIT = 5,
63 * LTTNG_RUN = 6,
64 * LTTNG_DEAD = 7,
65 * };
66 */
67 int STATEDUMP_PROCESS_STATUS_WAIT_CPU = 2;
68 int STATEDUMP_PROCESS_STATUS_WAIT = 5;
69 }
This page took 0.047315 seconds and 4 git commands to generate.