Index: src/heap-inl.h |
diff --git a/src/heap-inl.h b/src/heap-inl.h |
index a0762a330658a864d75ffb4d2fd540439a0cc7d6..13ac4a786a21bb48a6e09be6031a834e5013c807 100644 |
--- a/src/heap-inl.h |
+++ b/src/heap-inl.h |
@@ -525,6 +525,14 @@ void Heap::ScavengeObject(HeapObject** p, HeapObject* object) { |
return; |
} |
+ if (FLAG_trace_track_allocation_sites && |
+ AllocationSite::CanTrack(object->map()->instance_type()) && |
+ object->IsJSObject()) { |
+ if (AllocationMemento::FindForJSObject(JSObject::cast(object)) != NULL) { |
+ object->GetIsolate()->heap()->allocation_mementos_found_on_scavenge_++; |
+ } |
+ } |
+ |
// AllocationMementos are unrooted and shouldn't survive a scavenge |
ASSERT(object->map() != object->GetHeap()->allocation_memento_map()); |
// Call the slow part of scavenge object. |