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

Unified Diff: src/heap/objects-visiting.h

Issue 890663005: Introduce a flag for tracing retaining path in GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/objects-visiting.h
diff --git a/src/heap/objects-visiting.h b/src/heap/objects-visiting.h
index a442867569606c1d4471a3ee2720a1fc89cf5b13..a6261739b60872eb37e8c247cfabee63ec3e4784 100644
--- a/src/heap/objects-visiting.h
+++ b/src/heap/objects-visiting.h
@@ -381,6 +381,12 @@ VisitorDispatchTable<typename StaticNewSpaceVisitor<StaticVisitor>::Callback>
StaticNewSpaceVisitor<StaticVisitor>::table_;
+#ifdef TRACE_RETAINING_PATH
+void SetCurrentRetainer(HeapObject* obj);
+void ResetCurrentRetainer(HeapObject* obj);
+#endif
+
+
// Base class for visitors used to transitively mark the entire heap.
// IterateBody returns nothing.
// Certain types of objects might not be handled by this base class and
@@ -401,7 +407,13 @@ class StaticMarkingVisitor : public StaticVisitorBase {
static void Initialize();
INLINE(static void IterateBody(Map* map, HeapObject* obj)) {
+#ifdef TRACE_RETAINING_PATH
+ SetCurrentRetainer(obj);
+#endif
table_.GetVisitor(map)(map, obj);
+#ifdef TRACE_RETAINING_PATH
+ ResetCurrentRetainer(obj);
+#endif
}
INLINE(static void VisitPropertyCell(Map* map, HeapObject* object));
« src/heap/heap.cc ('K') | « src/heap/mark-compact.cc ('k') | src/heap/objects-visiting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698