diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-02-20 16:17:30 -0800 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2014-02-20 16:17:30 -0800 |
commit | 90d706849a09590f150748ff97256ef718aca441 (patch) | |
tree | 0126eac69b82895b17cffd1ce5b893c268aa6a5f | |
parent | c4a2ee4958c1abe17973233b154874ade01d0a99 (diff) | |
download | art-90d706849a09590f150748ff97256ef718aca441.zip art-90d706849a09590f150748ff97256ef718aca441.tar.gz art-90d706849a09590f150748ff97256ef718aca441.tar.bz2 |
Fix oatdumpd.
Bug: 13063529
Change-Id: I777cd7621ed522b8ab84c5bb1a9d2e5583817a08
-rw-r--r-- | oatdump/oatdump.cc | 4 | ||||
-rw-r--r-- | runtime/gc/heap.h | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index 53b07f9..2a0d826 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -808,6 +808,10 @@ class ImageDumper { { WriterMutexLock mu(self, *Locks::heap_bitmap_lock_); heap->FlushAllocStack(); + // Since FlushAllocStack() above resets the (active) allocation + // stack. Need to revoke the thread-local allocation stacks that + // point into it. + heap->RevokeAllThreadLocalAllocationStacks(self); } { std::ostream* saved_os = os_; diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h index 80a5a1a..49fc97a 100644 --- a/runtime/gc/heap.h +++ b/runtime/gc/heap.h @@ -474,6 +474,9 @@ class Heap { void FlushAllocStack() EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_); + // Revoke all the thread-local allocation stacks. + void RevokeAllThreadLocalAllocationStacks(Thread* self); + // Mark all the objects in the allocation stack in the specified bitmap. void MarkAllocStack(accounting::SpaceBitmap* bitmap1, accounting::SpaceBitmap* bitmap2, accounting::ObjectSet* large_objects, accounting::ObjectStack* stack) @@ -670,9 +673,6 @@ class Heap { // Swap the allocation stack with the live stack. void SwapStacks(Thread* self); - // Revoke all the thread-local allocation stacks. - void RevokeAllThreadLocalAllocationStacks(Thread* self); - // Clear cards and update the mod union table. void ProcessCards(TimingLogger& timings); |