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

Unified Diff: runtime/vm/object_graph.h

Issue 2502283003: Add a version of heap snapshots that use only fields and stack frames as roots and only include ins… (Closed)
Patch Set: . Created 4 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
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object_graph.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_graph.h
diff --git a/runtime/vm/object_graph.h b/runtime/vm/object_graph.h
index cae668a527c4fb550cacfa03703b73aaa3c10310..8060fbac593246b0c78917b423f658364130eb5b 100644
--- a/runtime/vm/object_graph.h
+++ b/runtime/vm/object_graph.h
@@ -6,11 +6,14 @@
#define RUNTIME_VM_OBJECT_GRAPH_H_
#include "vm/allocation.h"
-#include "vm/object.h"
namespace dart {
+class Array;
class Isolate;
+class Object;
+class RawObject;
+class WriteStream;
// Utility to traverse the object graph in an ordered fashion.
// Example uses:
@@ -93,12 +96,16 @@ class ObjectGraph : public StackResource {
// be live due to references from the stack or embedder handles.
intptr_t InboundReferences(Object* obj, const Array& references);
+ enum SnapshotRoots { kVM, kUser };
+
// Write the isolate's object graph to 'stream'. Smis and nulls are omitted.
// Returns the number of nodes in the stream, including the root.
// If collect_garabage is false, the graph will include weakly-reachable
// objects.
// TODO(koda): Document format; support streaming/chunking.
- intptr_t Serialize(WriteStream* stream, bool collect_garbage);
+ intptr_t Serialize(WriteStream* stream,
+ SnapshotRoots roots,
+ bool collect_garbage);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectGraph);
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698