summaryrefslogtreecommitdiffstats
path: root/runtime/thread.h
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2017-01-16 14:58:23 +0000
committerRoland Levillain <rpl@google.com>2017-01-17 11:55:07 +0000
commite71b35446985835363a4508646cf7b1121bd95a3 (patch)
treebd40763b04ba2028f3383736b2a14808e407120c /runtime/thread.h
parent8bd59a0fd46db83616785168231e09fb95ed2ead (diff)
downloadart-e71b35446985835363a4508646cf7b1121bd95a3.tar.gz
art-e71b35446985835363a4508646cf7b1121bd95a3.tar.bz2
art-e71b35446985835363a4508646cf7b1121bd95a3.zip
Move some fields in art::Thread to reduce maintenance burden.
Move fields `thread_local_start`, `thread_local_pos`, `thread_local_end` and `thread_local_objects` before fields `jni_entrypoints` and `quick_entrypoints` within art::Thread, to avoid repetitive art::Thread field moves in future CLs caused by the addition or deletion of entry points. Test: m test-art-host test: m test-art-target (on ARM) Change-Id: Ib67842e44a7f21a871ca4d1bb95dc6f7cfedc829
Diffstat (limited to 'runtime/thread.h')
-rw-r--r--runtime/thread.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/thread.h b/runtime/thread.h
index 3958c10d57..2b451bcaee 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -1426,7 +1426,7 @@ class Thread {
stacked_shadow_frame_record(nullptr), deoptimization_context_stack(nullptr),
frame_id_to_shadow_frame(nullptr), name(nullptr), pthread_self(0),
last_no_thread_suspension_cause(nullptr), checkpoint_function(nullptr),
- thread_local_pos(nullptr), thread_local_end(nullptr), thread_local_start(nullptr),
+ thread_local_start(nullptr), thread_local_pos(nullptr), thread_local_end(nullptr),
thread_local_objects(0), mterp_current_ibase(nullptr), mterp_default_ibase(nullptr),
mterp_alt_ibase(nullptr), thread_local_alloc_stack_top(nullptr),
thread_local_alloc_stack_end(nullptr), nested_signal_state(nullptr),
@@ -1545,21 +1545,21 @@ class Thread {
// to avoid additional cost of a mutex and a condition variable, as used in art::Barrier.
AtomicInteger* active_suspend_barriers[kMaxSuspendBarriers];
- // Entrypoint function pointers.
- // TODO: move this to more of a global offset table model to avoid per-thread duplication.
- JniEntryPoints jni_entrypoints;
- QuickEntryPoints quick_entrypoints;
+ // Thread-local allocation pointer. Moved here to force alignment for thread_local_pos on ARM.
+ uint8_t* thread_local_start;
// thread_local_pos and thread_local_end must be consecutive for ldrd and are 8 byte aligned for
// potentially better performance.
uint8_t* thread_local_pos;
uint8_t* thread_local_end;
- // Thread-local allocation pointer.
- uint8_t* thread_local_start;
-
size_t thread_local_objects;
+ // Entrypoint function pointers.
+ // TODO: move this to more of a global offset table model to avoid per-thread duplication.
+ JniEntryPoints jni_entrypoints;
+ QuickEntryPoints quick_entrypoints;
+
// Mterp jump table bases.
void* mterp_current_ibase;
void* mterp_default_ibase;