Add a C++ equivalent of Android's TimingLogger, and use it for the heap.
This also changes us over to one big stats update at the end of sweeping,
like Dalvik, rather than recording every single free individually.
Change-Id: Ib8e2a83d41d36e35e154183a4e173e915af79ae9
diff --git a/src/object.h b/src/object.h
index 35e355d..5bbdc6b 100644
--- a/src/object.h
+++ b/src/object.h
@@ -770,12 +770,12 @@
}
uint32_t GetOatCodeOffset() const {
- CHECK(!Runtime::Current()->IsStarted());
+ DCHECK(!Runtime::Current()->IsStarted());
return reinterpret_cast<uint32_t>(GetCode());
}
void SetOatCodeOffset(uint32_t code_offset) {
- CHECK(!Runtime::Current()->IsStarted());
+ DCHECK(!Runtime::Current()->IsStarted());
SetCode(reinterpret_cast<void*>(code_offset));
}
@@ -809,12 +809,12 @@
}
uint32_t GetOatMappingTableOffset() const {
- CHECK(!Runtime::Current()->IsStarted());
+ DCHECK(!Runtime::Current()->IsStarted());
return reinterpret_cast<uint32_t>(GetMappingTableRaw());
}
void SetOatMappingTableOffset(uint32_t mapping_table_offset) {
- CHECK(!Runtime::Current()->IsStarted());
+ DCHECK(!Runtime::Current()->IsStarted());
SetMappingTable(reinterpret_cast<const uint32_t*>(mapping_table_offset));
}
@@ -843,12 +843,12 @@
}
uint32_t GetOatVmapTableOffset() const {
- CHECK(!Runtime::Current()->IsStarted());
+ DCHECK(!Runtime::Current()->IsStarted());
return reinterpret_cast<uint32_t>(GetVmapTableRaw());
}
void SetOatVmapTableOffset(uint32_t vmap_table_offset) {
- CHECK(!Runtime::Current()->IsStarted());
+ DCHECK(!Runtime::Current()->IsStarted());
SetVmapTable(reinterpret_cast<uint16_t*>(vmap_table_offset));
}
@@ -906,12 +906,12 @@
}
uint32_t GetOatInvokeStubOffset() const {
- CHECK(!Runtime::Current()->IsStarted());
+ DCHECK(!Runtime::Current()->IsStarted());
return reinterpret_cast<uint32_t>(GetInvokeStub());
}
void SetOatInvokeStubOffset(uint32_t invoke_stub_offset) {
- CHECK(!Runtime::Current()->IsStarted());
+ DCHECK(!Runtime::Current()->IsStarted());
SetInvokeStub(reinterpret_cast<InvokeStub*>(invoke_stub_offset));
}