diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-04-29 14:37:57 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-04-30 15:23:36 -0700 |
commit | 0651d41e41341fb2e9ef3ee41dc1f1bfc832dbbb (patch) | |
tree | ad060fe7f37f4958d15d15d868e0cf6fb074d2cb /runtime/gc/collector/semi_space.h | |
parent | adcfc69aa94cc1d406ef78e194b1ac36e389ad95 (diff) | |
download | art-0651d41e41341fb2e9ef3ee41dc1f1bfc832dbbb.zip art-0651d41e41341fb2e9ef3ee41dc1f1bfc832dbbb.tar.gz art-0651d41e41341fb2e9ef3ee41dc1f1bfc832dbbb.tar.bz2 |
Add thread unsafe allocation methods to spaces.
Used by SS/GSS collectors since these run with mutators suspended and
only allocate from a single thread. Added AllocThreadUnsafe to
BumpPointerSpace and RosAllocSpace. Added AllocThreadUnsafe which uses
current runs as thread local runs for a thread unsafe allocation.
Added code to revoke current runs which are the same idx as thread
local runs.
Changed:
The number of thread local runs in each thread is now the the number
of thread local runs in RosAlloc instead of the number of size
brackets.
Total GC time / time on EvaluateAndApplyChanges.
TLAB SS:
Before: 36.7s / 7254
After: 16.1s / 4837
TLAB GSS:
Before: 6.9s / 3973
After: 5.7s / 3778
Bug: 8981901
Change-Id: Id1d264ade3799f431bf7ebbdcca6146aefbeb632
Diffstat (limited to 'runtime/gc/collector/semi_space.h')
-rw-r--r-- | runtime/gc/collector/semi_space.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/runtime/gc/collector/semi_space.h b/runtime/gc/collector/semi_space.h index 9b6df16..3b3e1b1 100644 --- a/runtime/gc/collector/semi_space.h +++ b/runtime/gc/collector/semi_space.h @@ -98,12 +98,10 @@ class SemiSpace : public GarbageCollector { // Returns the new address of the object. template<bool kPoisonReferences> void MarkObject(mirror::ObjectReference<kPoisonReferences, mirror::Object>* obj_ptr) - EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_) - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_); void ScanObject(mirror::Object* obj) - EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_) - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_); void VerifyNoFromSpaceReferences(mirror::Object* obj) SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_); @@ -150,8 +148,7 @@ class SemiSpace : public GarbageCollector { SHARED_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_); virtual mirror::Object* MarkNonForwardedObject(mirror::Object* obj) - EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_) - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_); // Schedules an unmarked object for reference processing. void DelayReferenceReferent(mirror::Class* klass, mirror::Reference* reference) |