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

Unified Diff: runtime/vm/scavenger.cc

Issue 10452006: Implement a heap profiler for the Dart managed heap. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: added basic test code Created 8 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: runtime/vm/scavenger.cc
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index b469d5fe2959d4beaf0cc5ffc7573e381e47c93b..6e959b17fb87e023052927f1702cf0f936792f55 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -344,6 +344,16 @@ void Scavenger::VisitObjectPointers(ObjectPointerVisitor* visitor) const {
}
+void Scavenger::VisitObjects(ObjectVisitor* visitor) const {
+ uword cur = FirstObjectStart();
+ while (cur < top_) {
+ RawObject* raw_obj = RawObject::FromAddr(cur);
+ visitor->VisitObject(raw_obj);
+ cur += raw_obj->Size();
+ }
+}
+
+
void Scavenger::Scavenge() {
// TODO(cshapiro): Add a decision procedure for determining when the
// the API callbacks should be invoked.
« runtime/vm/raw_object.h ('K') | « runtime/vm/scavenger.h ('k') | runtime/vm/unicode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698