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

Unified Diff: runtime/vm/gc_marker.cc

Issue 51653006: Track live instance and allocation counts for classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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: runtime/vm/gc_marker.cc
diff --git a/runtime/vm/gc_marker.cc b/runtime/vm/gc_marker.cc
index c5b5dc80cb069f8aada8a593c875f5d3c89bf201..504a8b5e419055a532de961974424d72041fb0cd 100644
--- a/runtime/vm/gc_marker.cc
+++ b/runtime/vm/gc_marker.cc
@@ -127,6 +127,7 @@ class MarkingVisitor : public ObjectPointerVisitor {
: ObjectPointerVisitor(isolate),
heap_(heap),
vm_heap_(Dart::vm_isolate()->heap()),
+ class_table_(isolate->class_table()),
page_space_(page_space),
marking_stack_(marking_stack),
visiting_old_object_(NULL) {
@@ -209,14 +210,16 @@ class MarkingVisitor : public ObjectPointerVisitor {
visiting_old_object_->SetRememberedBit();
isolate()->store_buffer()->AddObjectGC(visiting_old_object_);
}
+ class_table_->ReportLiveNewSpace(raw_obj->GetClassId(), raw_obj->Size());
Ivan Posva 2013/12/12 13:53:24 This is not correct since the marker does not trac
Cutch 2013/12/13 01:31:09 Done.
return;
}
-
+ class_table_->ReportLiveOldSpace(raw_obj->GetClassId(), raw_obj->Size());
Ivan Posva 2013/12/12 13:53:24 ReportLiveOldSpace -> UpdateLiveOld
Cutch 2013/12/13 01:31:09 Done.
MarkAndPush(raw_obj);
}
Heap* heap_;
Heap* vm_heap_;
+ ClassTable* class_table_;
PageSpace* page_space_;
MarkingStack* marking_stack_;
RawObject* visiting_old_object_;

Powered by Google App Engine
This is Rietveld 408576698