Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1481)

Unified Diff: src/heap.cc

Issue 3417019: Provide more functions to CPU profiler (fix issue 858). (Closed)
Patch Set: Hooked on MC/MS also Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698