Add and use ScopedSuspendAll
Usage replaces most SuspendAll and ResumeAll calls.
Change-Id: I355683a5365876242cea85a656dcb58455f7a294
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index aa4cf55..e248604 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -1606,10 +1606,8 @@
// stack. Need to revoke the thread-local allocation stacks that
// point into it.
ScopedThreadSuspension sts(self, kNative);
- ThreadList* thread_list = Runtime::Current()->GetThreadList();
- thread_list->SuspendAll(__FUNCTION__);
+ ScopedSuspendAll ssa(__FUNCTION__);
heap->RevokeAllThreadLocalAllocationStacks(self);
- thread_list->ResumeAll();
}
{
// Mark dex caches.