Elliott Hughes | 2faa5f1 | 2012-01-30 14:42:07 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 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 | */ |
Ian Rogers | 9651f42 | 2011-09-19 20:26:07 -0700 | [diff] [blame] | 16 | |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 17 | #ifndef ART_RUNTIME_ASM_SUPPORT_H_ |
| 18 | #define ART_RUNTIME_ASM_SUPPORT_H_ |
Ian Rogers | 9651f42 | 2011-09-19 20:26:07 -0700 | [diff] [blame] | 19 | |
Ian Rogers | 4b07f17 | 2013-02-07 08:29:42 -0800 | [diff] [blame] | 20 | // Value loaded into rSUSPEND for quick. When this value is counted down to zero we do a suspend |
| 21 | // check. |
Ian Rogers | 4a510d8 | 2011-10-09 14:30:24 -0700 | [diff] [blame] | 22 | #define SUSPEND_CHECK_INTERVAL (1000) |
| 23 | |
Ian Rogers | d9c4fc9 | 2013-10-01 19:45:43 -0700 | [diff] [blame] | 24 | // Offsets within java.lang.Object. |
Ian Rogers | a9a8254 | 2013-10-04 11:17:26 -0700 | [diff] [blame] | 25 | #define CLASS_OFFSET 0 |
Ian Rogers | d9c4fc9 | 2013-10-01 19:45:43 -0700 | [diff] [blame] | 26 | #define LOCK_WORD_OFFSET 4 |
| 27 | |
Ian Rogers | a9a8254 | 2013-10-04 11:17:26 -0700 | [diff] [blame] | 28 | // Offsets within java.lang.Class. |
| 29 | #define CLASS_COMPONENT_TYPE_OFFSET 12 |
| 30 | |
| 31 | // Array offsets. |
| 32 | #define ARRAY_LENGTH_OFFSET 8 |
| 33 | #define OBJECT_ARRAY_DATA_OFFSET 12 |
| 34 | |
Ian Rogers | 4b07f17 | 2013-02-07 08:29:42 -0800 | [diff] [blame] | 35 | // Offsets within java.lang.String. |
buzbee | fc9e6fa | 2012-03-23 15:14:29 -0700 | [diff] [blame] | 36 | #define STRING_VALUE_OFFSET 8 |
| 37 | #define STRING_COUNT_OFFSET 12 |
| 38 | #define STRING_OFFSET_OFFSET 20 |
| 39 | #define STRING_DATA_OFFSET 12 |
| 40 | |
Jeff Hao | 88474b4 | 2013-10-23 16:24:40 -0700 | [diff] [blame] | 41 | // Offsets within java.lang.Method. |
| 42 | #define METHOD_DEX_CACHE_METHODS_OFFSET 16 |
Jeff Hao | aa4a793 | 2013-05-13 11:28:27 -0700 | [diff] [blame] | 43 | #define METHOD_CODE_OFFSET 40 |
Jeff Hao | 5d91730 | 2013-02-27 17:57:33 -0800 | [diff] [blame] | 44 | |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 45 | #endif // ART_RUNTIME_ASM_SUPPORT_H_ |