diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-07-11 10:26:37 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-07-11 14:18:46 -0700 |
commit | 14cc9be4adc652071979395d337d1380763844fa (patch) | |
tree | b099b16ba09da3264f6c10d7dda56808466352f2 /runtime/thread.h | |
parent | 3641ac7de8b51c0853eaaa2ba3a3ab7e65a837c5 (diff) | |
download | art-14cc9be4adc652071979395d337d1380763844fa.tar.gz art-14cc9be4adc652071979395d337d1380763844fa.tar.bz2 art-14cc9be4adc652071979395d337d1380763844fa.zip |
Faster TLAB allocator.
New TLAB allocator doesn't increment bytes allocated until we allocate
a new TLAB. This increases allocation performance by avoiding a CAS.
MemAllocTest:
Before GSS TLAB: 3400ms.
After GSS TLAB: 2750ms.
Bug: 9986565
Change-Id: I1673c27555330ee90d353b98498fa0e67bd57fad
Diffstat (limited to 'runtime/thread.h')
-rw-r--r-- | runtime/thread.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/thread.h b/runtime/thread.h index 4312741a51..1b335c82e0 100644 --- a/runtime/thread.h +++ b/runtime/thread.h @@ -781,7 +781,7 @@ class Thread { void RevokeThreadLocalAllocationStack(); size_t GetThreadLocalBytesAllocated() const { - return tlsPtr_.thread_local_pos - tlsPtr_.thread_local_start; + return tlsPtr_.thread_local_end - tlsPtr_.thread_local_start; } size_t GetThreadLocalObjectsAllocated() const { |