Refactor spaces and add free list large object space
Added some more abstraction for spaces, we now have ContinuousSpaces and DiscontinousSpaces.
Added a free list version of large object space.
Performance should be better than the memory map version since we avoid creating more than
one memory map.
Added a cause for Gc which prints with the Gc message, dalvik has this as well.
Change-Id: Ie4aa6b204fbde7193e8305eb246158fae0444cc1
diff --git a/src/oatdump.cc b/src/oatdump.cc
index ab7f277..7e14199 100644
--- a/src/oatdump.cc
+++ b/src/oatdump.cc
@@ -581,9 +581,13 @@
}
ReaderMutexLock mu(*Locks::heap_bitmap_lock_);
// TODO: C++0x auto
- for (Spaces::const_iterator cur = spaces.begin(); cur != spaces.end(); ++cur) {
- (*cur)->GetLiveBitmap()->Walk(ImageDumper::Callback, this);
- os_ << "\n";
+ for (Spaces::const_iterator it = spaces.begin(); it != spaces.end(); ++it) {
+ Space* space = *it;
+ if (space->IsImageSpace()) {
+ ImageSpace* image_space = space->AsImageSpace();
+ image_space->GetLiveBitmap()->Walk(ImageDumper::Callback, this);
+ os_ << "\n";
+ }
}
// Dump the large objects separately.
heap->GetLargeObjectsSpace()->GetLiveObjects()->Walk(ImageDumper::Callback, this);