1 /*******************************************************************************
2 * Copyright (c) 2015 EfficiOS Inc., Alexandre Montplaisir
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
10 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.internal
.analysis
.os
.linux
.core
.kernelanalysis
;
16 * Definitions of values used in the Linux kernel code.
18 * Instead of using "magic numbers" in state providers, the definitions should
19 * be added here first.
21 * @author Alexandre Montplaisir
23 @SuppressWarnings("javadoc")
24 public interface LinuxValues
{
27 * Process states found in scheduler events.
29 * From include/linux/sched.h
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
45 int TASK_STATE_RUNNING
= 0;
46 int TASK_STATE_MAX
= 1024;
49 * Process statuses, used in LTTng statedump events.
51 * This is LTTng-specific, but the statedump are handled at this level, so
52 * it makes sense to add those definitions here.
54 * Taken from lttng-module's lttng-statedump-impl.c:
56 * enum lttng_process_status {
58 * LTTNG_WAIT_FORK = 1,
67 int STATEDUMP_PROCESS_STATUS_WAIT_CPU
= 2;
68 int STATEDUMP_PROCESS_STATUS_WAIT
= 5;