Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index e81a0e3b3b3e3dd7fc7ec8826f323949e6f093d3..4722aec23815476a3a8c6b7e65adb68865a31c50 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -2100,7 +2100,8 @@ class ScavengingVisitor : public StaticVisitorBase { |
if (logging_and_profiling_mode == LOGGING_AND_PROFILING_ENABLED) { |
// Update NewSpace stats if necessary. |
RecordCopiedObject(heap, target); |
- HEAP_PROFILE(heap, ObjectMoveEvent(source->address(), target->address())); |
+ HEAP_PROFILE(heap, |
+ ObjectMoveEvent(source->address(), target->address(), size)); |
Isolate* isolate = heap->isolate(); |
if (isolate->logger()->is_logging_code_events() || |
isolate->cpu_profiler()->is_profiling()) { |
@@ -4975,6 +4976,13 @@ MaybeObject* Heap::CopyJSObject(JSObject* source, AllocationSite* site) { |
alloc_memento->set_map_no_write_barrier(allocation_memento_map()); |
ASSERT(site->map() == allocation_site_map()); |
alloc_memento->set_allocation_site(site, SKIP_WRITE_BARRIER); |
+ HeapProfiler* profiler = isolate()->heap_profiler(); |
Hannes Payer (out of office)
2013/10/02 18:00:29
Why do you track the allocation of the memento sep
Hannes Payer (out of office)
2013/10/02 18:20:04
Ok, ignore question two, because you allocate usin
Alexandra Mikhaylova
2013/10/03 16:27:55
The memento is treated as a separate HeapObject wh
Hannes Payer (out of office)
2013/10/10 18:54:40
OK. You could also ignore the mementos since they
|
+ if (profiler->is_tracking_allocations()) { |
+ profiler->UpdateObjectSizeEvent(HeapObject::cast(clone)->address(), |
+ object_size); |
+ profiler->NewObjectEvent(alloc_memento->address(), |
+ AllocationMemento::kSize); |
+ } |
} |
} |