Remove started runtime check in RevokeAllThreadLocalAllocationStacks
This check occasionally caused some thread local allocation stacks
to incorrectly not get revoked when multiple threads were allocating
without a started runtime. This showed up in image_test with
compaction enabled when we were initializing classes in the compiler
driver.
Change-Id: I7f28d072feea333c2503e35265ba25c51a6308fe
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index 83202a5..5d44ee1 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -207,11 +207,9 @@
// Check sanity of all live references.
void VerifyHeap() LOCKS_EXCLUDED(Locks::heap_bitmap_lock_);
bool VerifyHeapReferences()
- EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_)
- SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);
bool VerifyMissingCardMarks()
- EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_)
- SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_, Locks::mutator_lock_);
// A weaker test than IsLiveObject or VerifyObject that doesn't require the heap lock,
// and doesn't abort on error, allowing the caller to report more
@@ -463,7 +461,8 @@
EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_);
// Revoke all the thread-local allocation stacks.
- void RevokeAllThreadLocalAllocationStacks(Thread* self);
+ void RevokeAllThreadLocalAllocationStacks(Thread* self)
+ EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_);
// Mark all the objects in the allocation stack in the specified bitmap.
void MarkAllocStack(accounting::SpaceBitmap* bitmap1, accounting::SpaceBitmap* bitmap2,