diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2015-03-19 12:35:04 -0700 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2015-03-20 11:49:31 -0700 |
commit | e01a520fe0010f8abd344b5ed7120787d7ed1d71 (patch) | |
tree | 497937fea803b9d5e2e1fd5923b2ccfb76504ff3 /runtime/thread.h | |
parent | f5988cf0c47ff935bb19c89ed0398be5fbe44bb6 (diff) | |
download | art-e01a520fe0010f8abd344b5ed7120787d7ed1d71.tar.gz art-e01a520fe0010f8abd344b5ed7120787d7ed1d71.tar.bz2 art-e01a520fe0010f8abd344b5ed7120787d7ed1d71.zip |
Assembly TLAB allocation fast path for x86_64.
TODO: resolved/initialized cases, other architectures.
Bug: 9986565
Change-Id: If6df3449a3b2f5074d11babdda0fd2791fd54946
Diffstat (limited to 'runtime/thread.h')
-rw-r--r-- | runtime/thread.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/thread.h b/runtime/thread.h index da7af83e0b..9d4d89d0c4 100644 --- a/runtime/thread.h +++ b/runtime/thread.h @@ -573,6 +573,21 @@ class Thread { OFFSETOF_MEMBER(tls_ptr_sized_values, suspend_trigger)); } + template<size_t pointer_size> + static ThreadOffset<pointer_size> ThreadLocalPosOffset() { + return ThreadOffsetFromTlsPtr<pointer_size>(OFFSETOF_MEMBER(tls_ptr_sized_values, thread_local_pos)); + } + + template<size_t pointer_size> + static ThreadOffset<pointer_size> ThreadLocalEndOffset() { + return ThreadOffsetFromTlsPtr<pointer_size>(OFFSETOF_MEMBER(tls_ptr_sized_values, thread_local_end)); + } + + template<size_t pointer_size> + static ThreadOffset<pointer_size> ThreadLocalObjectsOffset() { + return ThreadOffsetFromTlsPtr<pointer_size>(OFFSETOF_MEMBER(tls_ptr_sized_values, thread_local_objects)); + } + // Size of stack less any space reserved for stack overflow size_t GetStackSize() const { return tlsPtr_.stack_size - (tlsPtr_.stack_end - tlsPtr_.stack_begin); |