Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 17 | #ifndef ART_RUNTIME_THREAD_STATE_H_ |
| 18 | #define ART_RUNTIME_THREAD_STATE_H_ |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 19 | |
| 20 | namespace art { |
| 21 | |
| 22 | enum ThreadState { |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 23 | // Thread.State JDWP state |
Dave Allison | 0aded08 | 2013-11-07 13:15:11 -0800 | [diff] [blame] | 24 | kTerminated = 66, // TERMINATED TS_ZOMBIE Thread.run has returned, but Thread* still around |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 25 | kRunnable, // RUNNABLE TS_RUNNING runnable |
| 26 | kTimedWaiting, // TIMED_WAITING TS_WAIT in Object.wait() with a timeout |
| 27 | kSleeping, // TIMED_WAITING TS_SLEEPING in Thread.sleep() |
| 28 | kBlocked, // BLOCKED TS_MONITOR blocked on a monitor |
| 29 | kWaiting, // WAITING TS_WAIT in Object.wait() |
| 30 | kWaitingForGcToComplete, // WAITING TS_WAIT blocked waiting for GC |
| 31 | kWaitingForCheckPointsToRun, // WAITING TS_WAIT GC waiting for checkpoints to run |
| 32 | kWaitingPerformingGc, // WAITING TS_WAIT performing GC |
| 33 | kWaitingForDebuggerSend, // WAITING TS_WAIT blocked waiting for events to be sent |
| 34 | kWaitingForDebuggerToAttach, // WAITING TS_WAIT blocked waiting for debugger to attach |
| 35 | kWaitingInMainDebuggerLoop, // WAITING TS_WAIT blocking/reading/processing debugger events |
| 36 | kWaitingForDebuggerSuspension, // WAITING TS_WAIT waiting for debugger suspend all |
| 37 | kWaitingForJniOnLoad, // WAITING TS_WAIT waiting for execution of dlopen and JNI on load code |
| 38 | kWaitingForSignalCatcherOutput, // WAITING TS_WAIT waiting for signal catcher IO to complete |
| 39 | kWaitingInMainSignalCatcherLoop, // WAITING TS_WAIT blocking/reading/processing signals |
Sebastien Hertz | 138dbfc | 2013-12-04 18:15:25 +0100 | [diff] [blame] | 40 | kWaitingForDeoptimization, // WAITING TS_WAIT waiting for deoptimization suspend all |
Brian Carlstrom | 7934ac2 | 2013-07-26 10:54:15 -0700 | [diff] [blame] | 41 | kStarting, // NEW TS_WAIT native thread started, not yet ready to run managed code |
| 42 | kNative, // RUNNABLE TS_RUNNING running in a JNI native method |
| 43 | kSuspended, // RUNNABLE TS_RUNNING suspended by GC or debugger |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 44 | }; |
| 45 | |
| 46 | } // namespace art |
| 47 | |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 48 | #endif // ART_RUNTIME_THREAD_STATE_H_ |