diff options
author | Alex Light <allight@google.com> | 2018-10-01 13:21:47 -0700 |
---|---|---|
committer | Alex Light <allight@google.com> | 2018-10-01 14:57:18 -0700 |
commit | bb68fda18ef3d7ea183a322831a5afd20b6a8bff (patch) | |
tree | 5745a64e0e410ac3fe66cd54abd2bbfb84539e93 /runtime/thread.h | |
parent | 29391756f70489a5ab659988f058e359527a7af1 (diff) | |
download | art-bb68fda18ef3d7ea183a322831a5afd20b6a8bff.tar.gz art-bb68fda18ef3d7ea183a322831a5afd20b6a8bff.tar.bz2 art-bb68fda18ef3d7ea183a322831a5afd20b6a8bff.zip |
Move InterpreterCache to right below tlsPtr_
Change the position of the InterpreterCache field in Thread to be
directly below the tlsPtr_ field. Since both members of the tlsPtr_
and InterpreterCache fields are used by asm_code we need their offsets
in asm_support.h. The fields at the end of the Thread struct have been
undergoing changes. By moving this field up we avoid the need to
update asm_support.h whenever one of the fields is modified.
Test: ./test.py --host
Change-Id: Ic2863116ed446af155badfc3bf098add7ba0b699
Diffstat (limited to 'runtime/thread.h')
-rw-r--r-- | runtime/thread.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/runtime/thread.h b/runtime/thread.h index 3c85b80976..aaf6bae36f 100644 --- a/runtime/thread.h +++ b/runtime/thread.h @@ -1783,6 +1783,14 @@ class Thread { mirror::Throwable* async_exception; } tlsPtr_; + // Small thread-local cache to be used from the interpreter. + // It is keyed by dex instruction pointer. + // The value is opcode-depended (e.g. field offset). + InterpreterCache interpreter_cache_; + + // All fields below this line should not be accessed by native code. This means these fields can + // be modified, rearranged, added or removed without having to modify asm_support.h + // Guards the 'wait_monitor_' members. Mutex* wait_mutex_ DEFAULT_MUTEX_ACQUIRED_AFTER; @@ -1812,11 +1820,6 @@ class Thread { // be false for threads where '!can_call_into_java_'. bool can_be_suspended_by_user_code_; - // Small thread-local cache to be used from the interpreter. - // It is keyed by dex instruction pointer. - // The value is opcode-depended (e.g. field offset). - InterpreterCache interpreter_cache_; - friend class Dbg; // For SetStateUnsafe. friend class gc::collector::SemiSpace; // For getting stack traces. friend class Runtime; // For CreatePeer. |