| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index 76f34b263a3861c04fcbdd493f016daaa69d9a54..fec45d433bd86b351c216f392d57f43a3de43544 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -2130,9 +2130,12 @@ 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(), size));
|
| Isolate* isolate = heap->isolate();
|
| + HeapProfiler* heap_profiler = isolate->heap_profiler();
|
| + if (heap_profiler->is_profiling()) {
|
| + heap_profiler->ObjectMoveEvent(source->address(), target->address(),
|
| + size);
|
| + }
|
| if (isolate->logger()->is_logging_code_events() ||
|
| isolate->cpu_profiler()->is_profiling()) {
|
| if (target->IsSharedFunctionInfo()) {
|
|
|