• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2016 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
17// Offsets within ShadowFrame.
18
19#if defined(DEFINE_INCLUDE_DEPENDENCIES)
20#include "base/enums.h"    // PointerSize
21#include "stack.h"         // art::ShadowFrame
22#endif
23
24#include "common.def"        // DEFINE_OFFSET_EXPR
25
26#define DEFINE_THREAD_OFFSET(field_name, method_name) \
27  DEFINE_OFFSET_EXPR(Thread, field_name, int32_t, art::Thread::method_name##Offset<art::kRuntimePointerSize>().Int32Value())
28
29//                   New macro suffix            Method Name (of the Offset method)
30DEFINE_THREAD_OFFSET(FLAGS,                      ThreadFlags)
31DEFINE_THREAD_OFFSET(ID,                         ThinLockId)
32DEFINE_THREAD_OFFSET(IS_GC_MARKING,              IsGcMarking)
33DEFINE_THREAD_OFFSET(CARD_TABLE,                 CardTable)
34
35// TODO: The rest of the offsets
36// are dependent on __SIZEOF_POINTER__
37
38#undef DEFINE_THREAD_OFFSET
39
40#include "common_undef.def"  // undef DEFINE_OFFSET_EXPR
41