Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 16204355bc1c35ffe3a040003f52d8fe98a22adc..c13bbcc50cbe83e8f4d58580d6e5fc376977a8d7 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -2050,7 +2050,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()) { |
@@ -5033,6 +5034,14 @@ MaybeObject* Heap::CopyJSObjectWithAllocationSite( |
reinterpret_cast<Address>(clone) + object_size); |
alloc_memento->set_map_no_write_barrier(allocation_memento_map()); |
alloc_memento->set_allocation_site(site, SKIP_WRITE_BARRIER); |
+ |
+ HeapProfiler* profiler = isolate()->heap_profiler(); |
+ if (profiler->is_tracking_allocations()) { |
+ profiler->NewObjectEvent(HeapObject::cast(clone)->address(), |
loislo
2013/08/27 09:04:57
this call actually just updates the size for the o
Alexandra Mikhaylova
2013/09/19 16:03:38
Done.
|
+ object_size); |
+ profiler->NewObjectEvent(alloc_memento->address(), |
+ adjusted_object_size - object_size); |
+ } |
} |
SLOW_ASSERT( |