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

Unified Diff: runtime/vm/object_graph.cc

Issue 1124153006: Heap snapshot visualizations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: sync Created 5 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
« no previous file with comments | « runtime/vm/object_graph.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_graph.cc
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index 7ad50ed7f5ed4cca8fe825b639172d827336f564..773839dd16be356ec2be5035b7198de8c85c25ac 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -446,10 +446,11 @@ class WriteGraphVisitor : public ObjectGraph::Visitor {
};
-void ObjectGraph::Serialize(WriteStream* stream) {
+intptr_t ObjectGraph::Serialize(WriteStream* stream) {
// Current encoding assumes objects do not move, so promote everything to old.
isolate()->heap()->new_space()->Evacuate();
WriteGraphVisitor visitor(isolate(), stream);
+ stream->WriteUnsigned(kObjectAlignment);
stream->WriteUnsigned(0);
stream->WriteUnsigned(0);
stream->WriteUnsigned(0);
@@ -459,6 +460,7 @@ void ObjectGraph::Serialize(WriteStream* stream) {
}
stream->WriteUnsigned(0);
IterateObjects(&visitor);
+ return visitor.count() + 1; // + root
}
} // namespace dart
« no previous file with comments | « runtime/vm/object_graph.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698