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

Unified Diff: src/profile-generator.h

Issue 10037004: Split nodes and edges into separate arrays in heap snapshot serialization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update to the snapshot structure desciption. Created 8 years, 8 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 | « include/v8-profiler.h ('k') | src/profile-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.h
diff --git a/src/profile-generator.h b/src/profile-generator.h
index 1fa647eef1df03e3e6d1ba819cfb32e51d09efb5..bc96f661753c2eabad261d1b1d595bc5e2767f4b 100644
--- a/src/profile-generator.h
+++ b/src/profile-generator.h
@@ -648,6 +648,7 @@ class HeapSnapshot {
HeapEntry* gc_subroot(int index) { return gc_subroot_entries_[index]; }
List<HeapEntry*>* entries() { return &entries_; }
size_t raw_entries_size() { return raw_entries_size_; }
+ int number_of_edges() { return number_of_edges_; }
void RememberLastJSObjectId();
SnapshotObjectId max_snapshot_js_object_id() const {
return max_snapshot_js_object_id_;
@@ -690,6 +691,7 @@ class HeapSnapshot {
List<HeapEntry*> entries_;
List<HeapEntry*> sorted_entries_;
size_t raw_entries_size_;
+ int number_of_edges_;
SnapshotObjectId max_snapshot_js_object_id_;
friend class HeapSnapshotTester;
@@ -1143,12 +1145,14 @@ class HeapSnapshotJSONSerializer {
v8::internal::kZeroHashSeed);
}
+ void CalculateNodeIndexes(const List<HeapEntry*>& nodes);
HeapSnapshot* CreateFakeSnapshot();
int GetStringId(const char* s);
- void SerializeEdge(HeapGraphEdge* edge);
+ void SerializeEdge(HeapGraphEdge* edge, bool first_edge);
+ void SerializeEdges(const List<HeapEntry*>& nodes);
void SerializeImpl();
- void SerializeNode(HeapEntry* entry);
- void SerializeNodes();
+ void SerializeNode(HeapEntry* entry, int edges_index);
+ void SerializeNodes(const List<HeapEntry*>& nodes);
void SerializeSnapshot();
void SerializeString(const unsigned char* s);
void SerializeStrings();
« no previous file with comments | « include/v8-profiler.h ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698