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
diff --git a/runtime/thread.h b/runtime/thread.h
index 3c85b80..aaf6bae 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -1783,6 +1783,14 @@
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 @@
// 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.