Reviewers: Vyacheslav Egorov,

Description:
Don't track live bytes per space in debug mode.

Please review this at http://codereview.chromium.org/8381035/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/mark-compact-inl.h
  M     src/mark-compact.cc


Index: src/mark-compact-inl.h
===================================================================
--- src/mark-compact-inl.h      (revision 9771)
+++ src/mark-compact-inl.h      (working copy)
@@ -55,7 +55,9 @@
     mark_bit.Set();
     MemoryChunk::IncrementLiveBytes(obj->address(), obj->Size());
 #ifdef DEBUG
-    UpdateLiveObjectCount(obj);
+    if (FLAG_enable_slow_asserts) {
+      UpdateLiveObjectCount(obj);
+    }
 #endif
     ProcessNewlyMarkedObject(obj);
   }
@@ -68,7 +70,9 @@
   mark_bit.Set();
   MemoryChunk::IncrementLiveBytes(obj->address(), obj->Size());
 #ifdef DEBUG
-  UpdateLiveObjectCount(obj);
+  if (FLAG_enable_slow_asserts) {
+    UpdateLiveObjectCount(obj);
+  }
 #endif
 }

Index: src/mark-compact.cc
===================================================================
--- src/mark-compact.cc (revision 9771)
+++ src/mark-compact.cc (working copy)
@@ -2178,6 +2178,7 @@

 #ifdef DEBUG
 void MarkCompactCollector::UpdateLiveObjectCount(HeapObject* obj) {
+  ASSERT(FLAG_enable_slow_asserts);
   live_bytes_ += obj->Size();
   if (heap()->new_space()->Contains(obj)) {
     live_young_objects_size_ += obj->Size();


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to