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

Unified Diff: src/heap/object-stats.h

Issue 1943423002: Updates incremental marking pass to collect object statistics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed an unnecessary class declaration. Created 4 years, 7 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/object-stats.h
diff --git a/src/heap/object-stats.h b/src/heap/object-stats.h
index e2dcfaa4b772b023acd9b2e8b79e002aae9722fa..ce0a317cf1bf83ac8190efa5288f1229ae3770f6 100644
--- a/src/heap/object-stats.h
+++ b/src/heap/object-stats.h
@@ -81,16 +81,34 @@ class ObjectStats {
size_t object_sizes_last_time_[OBJECT_STATS_COUNT];
};
-
-class ObjectStatsVisitor : public StaticMarkingVisitor<ObjectStatsVisitor> {
+class ObjectStatsCollector {
public:
- static void Initialize(VisitorDispatchTable<Callback>* original);
-
- static void VisitBase(VisitorId id, Map* map, HeapObject* obj);
+ static void CollectStatistics(StaticVisitorBase::VisitorId id, Map* map,
+ HeapObject* obj);
+ static void CollectFixedArrayStatistics(HeapObject* obj);
static void CountFixedArray(FixedArrayBase* fixed_array,
FixedArraySubInstanceType fast_type,
FixedArraySubInstanceType dictionary_type);
+ static void RecordMapStats(Map* map, HeapObject* obj);
+ static void RecordCodeStats(Map* map, HeapObject* obj);
+ static void RecordSharedFunctionInfoStats(Map* map, HeapObject* obj);
+ static void RecordFixedArrayStats(Map* map, HeapObject* obj);
+};
+
+class MarkCompactObjectStatsVisitor
+ : public StaticMarkingVisitor<MarkCompactObjectStatsVisitor> {
+ public:
+ static void Initialize(VisitorDispatchTable<Callback>* original);
+
+ template <VisitorId id>
+ static inline void Visit(Map* map, HeapObject* obj);
+};
+
+class IncrementalMarkingObjectStatsVisitor
+ : public StaticMarkingVisitor<IncrementalMarkingObjectStatsVisitor> {
+ public:
+ static void Initialize(VisitorDispatchTable<Callback>* original);
template <VisitorId id>
static inline void Visit(Map* map, HeapObject* obj);

Powered by Google App Engine
This is Rietveld 408576698