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/space.cc b/src/space.cc
index ae35f57..9acb54e 100644
--- a/src/space.cc
+++ b/src/space.cc
@@ -13,8 +13,8 @@
namespace art {
-Space* Space::Create(size_t initial_size, size_t maximum_size, byte* requested_base) {
- UniquePtr<Space> space(new Space());
+Space* Space::Create(const std::string& name, size_t initial_size, size_t maximum_size, byte* requested_base) {
+ UniquePtr<Space> space(new Space(name));
bool success = space->Init(initial_size, maximum_size, requested_base);
if (!success) {
return NULL;
@@ -25,7 +25,7 @@
Space* Space::CreateFromImage(const std::string& image_file_name) {
CHECK(image_file_name != NULL);
- UniquePtr<Space> space(new Space());
+ UniquePtr<Space> space(new Space(image_file_name));
bool success = space->InitFromImage(image_file_name);
if (!success) {
return NULL;