Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 6d46740b2ef7b9955261c42978f31dcd215ad3af..f61e343f4ff821318f97f380092dd06fc7d9c55c 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -1218,7 +1218,14 @@ class ScavengingVisitor : public StaticVisitorBase { |
RecordCopiedObject(target); |
#endif |
HEAP_PROFILE(ObjectMoveEvent(source->address(), target->address())); |
- |
+#if defined(ENABLE_LOGGING_AND_PROFILING) |
+ if (Logger::is_logging() || CpuProfiler::is_profiling()) { |
+ if (target->IsJSFunction()) { |
+ PROFILE(FunctionMoveEvent(source->address(), target->address())); |
+ PROFILE(FunctionCreateEventFromMove(JSFunction::cast(target), source)); |
+ } |
+ } |
+#endif |
return target; |
} |