Revision: 7429
Author:   [email protected]
Date:     Wed Mar 30 02:37:26 2011
Log:      Pass in isolate when reporting deletion of objects.

[email protected]

Review URL: http://codereview.chromium.org/6756021
http://code.google.com/p/v8/source/detail?r=7429

Modified:
 /branches/bleeding_edge/src/mark-compact.cc
 /branches/bleeding_edge/src/mark-compact.h
 /branches/bleeding_edge/src/spaces.cc

=======================================
--- /branches/bleeding_edge/src/mark-compact.cc Wed Mar 30 01:43:02 2011
+++ /branches/bleeding_edge/src/mark-compact.cc Wed Mar 30 02:37:26 2011
@@ -1690,7 +1690,7 @@


 // Most non-live objects are ignored.
-inline void IgnoreNonLiveObject(HeapObject* object) {}
+inline void IgnoreNonLiveObject(HeapObject* object, Isolate* isolate) {}


 // Function template that, given a range of addresses (eg, a semispace or a
@@ -1744,7 +1744,7 @@
       }
     } else {  // Non-live object.
       object_size = object->Size();
-      ProcessNonLive(object);
+      ProcessNonLive(object, collector->heap()->isolate());
       if (is_prev_alive) {  // Transition from live to non-live.
         free_start = current;
         is_prev_alive = false;
@@ -2089,7 +2089,8 @@
           is_previous_alive = true;
         }
       } else {
-        heap->mark_compact_collector()->ReportDeleteIfNeeded(object);
+        heap->mark_compact_collector()->ReportDeleteIfNeeded(
+            object, heap->isolate());
         if (is_previous_alive) {  // Transition from live to free.
           free_start = current;
           is_previous_alive = false;
@@ -3046,7 +3047,8 @@
 }


-void MarkCompactCollector::ReportDeleteIfNeeded(HeapObject* obj) {
+void MarkCompactCollector::ReportDeleteIfNeeded(HeapObject* obj,
+                                                Isolate* isolate) {
 #ifdef ENABLE_GDB_JIT_INTERFACE
   if (obj->IsCode()) {
     GDBJITInterface::RemoveCode(reinterpret_cast<Code*>(obj));
@@ -3054,7 +3056,7 @@
 #endif
 #ifdef ENABLE_LOGGING_AND_PROFILING
   if (obj->IsCode()) {
-    PROFILE(ISOLATE, CodeDeleteEvent(obj->address()));
+    PROFILE(isolate, CodeDeleteEvent(obj->address()));
   }
 #endif
 }
=======================================
--- /branches/bleeding_edge/src/mark-compact.h  Fri Mar 18 13:35:07 2011
+++ /branches/bleeding_edge/src/mark-compact.h  Wed Mar 30 02:37:26 2011
@@ -129,7 +129,7 @@
                                    int* offset);

   // Type of functions to process non-live objects.
-  typedef void (*ProcessNonLiveFunction)(HeapObject* object);
+ typedef void (*ProcessNonLiveFunction)(HeapObject* object, Isolate* isolate);

   // Pointer to member function, used in IterateLiveObjects.
   typedef int (MarkCompactCollector::*LiveObjectCallback)(HeapObject* obj);
@@ -179,7 +179,7 @@
 #endif

   // Determine type of object and emit deletion log event.
-  static void ReportDeleteIfNeeded(HeapObject* obj);
+  static void ReportDeleteIfNeeded(HeapObject* obj, Isolate* isolate);

   // Returns size of a possibly marked object.
   static int SizeOfMarkedObject(HeapObject* obj);
=======================================
--- /branches/bleeding_edge/src/spaces.cc       Wed Mar 23 04:13:07 2011
+++ /branches/bleeding_edge/src/spaces.cc       Wed Mar 30 02:37:26 2011
@@ -3014,7 +3014,8 @@
       }

       // Free the chunk.
-      heap()->mark_compact_collector()->ReportDeleteIfNeeded(object);
+      heap()->mark_compact_collector()->ReportDeleteIfNeeded(
+          object, heap()->isolate());
       LiveObjectList::ProcessNonLive(object);

       size_ -= static_cast<int>(chunk_size);

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

Reply via email to