Ensure VM's heap is accounted correctly.
The meminfo dumping assumes that dalvik heap is created using ashmem and has a
prefix of "dalvik-". Ensure ART's anonymous mmaps fit this pattern. Tidy up
anonymous mmaps so naming is more consistent.
Change-Id: I9c62a9d1da21da6a048effb0399a1f85865cb12d
diff --git a/src/gc/space.cc b/src/gc/space.cc
index 9db84f2..9c71841 100644
--- a/src/gc/space.cc
+++ b/src/gc/space.cc
@@ -105,12 +105,12 @@
CHECK(reinterpret_cast<uintptr_t>(mem_map->Begin()) % kGcCardSize == 0);
CHECK(reinterpret_cast<uintptr_t>(mem_map->End()) % kGcCardSize == 0);
live_bitmap_.reset(SpaceBitmap::Create(
- StringPrintf("allocspace-%s-live-bitmap-%d", name.c_str(), static_cast<int>(bitmap_index)),
+ StringPrintf("allocspace %s live-bitmap %d", name.c_str(), static_cast<int>(bitmap_index)),
Begin(), Capacity()));
DCHECK(live_bitmap_.get() != NULL) << "could not create allocspace live bitmap #" << bitmap_index;
mark_bitmap_.reset(SpaceBitmap::Create(
- StringPrintf("allocspace-%s-mark-bitmap-%d", name.c_str(), static_cast<int>(bitmap_index)),
+ StringPrintf("allocspace %s mark-bitmap %d", name.c_str(), static_cast<int>(bitmap_index)),
Begin(), Capacity()));
DCHECK(live_bitmap_.get() != NULL) << "could not create allocspace mark bitmap #" << bitmap_index;
}
@@ -469,7 +469,7 @@
: MemMapSpace(name, mem_map, mem_map->Size(), kGcRetentionPolicyNeverCollect) {
const size_t bitmap_index = bitmap_index_++;
live_bitmap_.reset(SpaceBitmap::Create(
- StringPrintf("imagespace-%s-live-bitmap-%d", name.c_str(), static_cast<int>(bitmap_index)),
+ StringPrintf("imagespace %s live-bitmap %d", name.c_str(), static_cast<int>(bitmap_index)),
Begin(), Capacity()));
DCHECK(live_bitmap_.get() != NULL) << "could not create imagespace live bitmap #" << bitmap_index;
}