More MIPS fixes. The vm-tests and oat tests all work on the emulator.
- Changed the base address of the art image for MIPS to allow enough
space for CTS to run on the target.
- Fixed exception delivery to jump without linking, and to preserve the
value of $gp.
- Added dumping of /proc/self/maps whenever mmap fails, and cleaned up
other debugging output (not MIPS related).
Change-Id: I4e92e992ee6a6167e901db8ad90a6062bbc5168a
diff --git a/src/gc/atomic_stack.h b/src/gc/atomic_stack.h
index 3494861..d67d2f2 100644
--- a/src/gc/atomic_stack.h
+++ b/src/gc/atomic_stack.h
@@ -136,11 +136,7 @@
// Size in number of elements.
void Init() {
mem_map_.reset(MemMap::MapAnonymous(name_.c_str(), NULL, capacity_ * sizeof(T), PROT_READ | PROT_WRITE));
- if (mem_map_.get() == NULL) {
- std::string maps;
- ReadFileToString("/proc/self/maps", &maps);
- LOG(FATAL) << "couldn't allocate mark stack\n" << maps;
- }
+ CHECK(mem_map_.get() != NULL) << "couldn't allocate mark stack";
byte* addr = mem_map_->Begin();
CHECK(addr != NULL);
begin_ = reinterpret_cast<T*>(addr);
diff --git a/src/gc/card_table.cc b/src/gc/card_table.cc
index 5a1e9b5..a5531d8 100644
--- a/src/gc/card_table.cc
+++ b/src/gc/card_table.cc
@@ -54,11 +54,7 @@
/* Allocate an extra 256 bytes to allow fixed low-byte of base */
UniquePtr<MemMap> mem_map(MemMap::MapAnonymous("dalvik-card-table", NULL,
capacity + 256, PROT_READ | PROT_WRITE));
- if (mem_map.get() == NULL) {
- std::string maps;
- ReadFileToString("/proc/self/maps", &maps);
- LOG(FATAL) << "couldn't allocate card table\n" << maps;
- }
+ CHECK(mem_map.get() != NULL) << "couldn't allocate card table";
// All zeros is the correct initial value; all clean. Anonymous mmaps are initialized to zero, we
// don't clear the card table to avoid unnecessary pages being allocated
COMPILE_ASSERT(kCardClean == 0, card_clean_must_be_0);