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

Side by Side Diff: test/cctest/test-heap-profiler.cc

Issue 10353010: Split nodes and edges into separate arrays in heap profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comments. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/profile-generator-inl.h ('k') | test/cctest/test-list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // 2 //
3 // Tests for heap profiler 3 // Tests for heap profiler
4 4
5 #include <ctype.h> 5 #include <ctype.h>
6 6
7 #include "v8.h" 7 #include "v8.h"
8 8
9 #include "cctest.h" 9 #include "cctest.h"
10 #include "heap-profiler.h" 10 #include "heap-profiler.h"
(...skipping 16 matching lines...) Expand all
27 if (strcmp(entry->name(), "C2") == 0) has_C2 = true; 27 if (strcmp(entry->name(), "C2") == 0) has_C2 = true;
28 } 28 }
29 29
30 void CheckAllReachables(i::HeapEntry* root) { 30 void CheckAllReachables(i::HeapEntry* root) {
31 i::List<i::HeapEntry*> list(10); 31 i::List<i::HeapEntry*> list(10);
32 list.Add(root); 32 list.Add(root);
33 root->paint(); 33 root->paint();
34 CheckEntry(root); 34 CheckEntry(root);
35 while (!list.is_empty()) { 35 while (!list.is_empty()) {
36 i::HeapEntry* entry = list.RemoveLast(); 36 i::HeapEntry* entry = list.RemoveLast();
37 i::Vector<i::HeapGraphEdge> children = entry->children(); 37 i::Vector<i::HeapGraphEdge*> children = entry->children();
38 for (int i = 0; i < children.length(); ++i) { 38 for (int i = 0; i < children.length(); ++i) {
39 if (children[i].type() == i::HeapGraphEdge::kShortcut) continue; 39 if (children[i]->type() == i::HeapGraphEdge::kShortcut) continue;
40 i::HeapEntry* child = children[i].to(); 40 i::HeapEntry* child = children[i]->to();
41 if (!child->painted()) { 41 if (!child->painted()) {
42 list.Add(child); 42 list.Add(child);
43 child->paint(); 43 child->paint();
44 CheckEntry(child); 44 CheckEntry(child);
45 } 45 }
46 } 46 }
47 } 47 }
48 } 48 }
49 49
50 bool has_A2; 50 bool has_A2;
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 const v8::HeapGraphNode* global_object = 1657 const v8::HeapGraphNode* global_object =
1658 GetProperty(global, v8::HeapGraphEdge::kProperty, "global_object"); 1658 GetProperty(global, v8::HeapGraphEdge::kProperty, "global_object");
1659 CHECK_NE(NULL, global_object); 1659 CHECK_NE(NULL, global_object);
1660 const v8::HeapGraphNode* properties = 1660 const v8::HeapGraphNode* properties =
1661 GetProperty(global_object, v8::HeapGraphEdge::kInternal, "properties"); 1661 GetProperty(global_object, v8::HeapGraphEdge::kInternal, "properties");
1662 CHECK_EQ(NULL, properties); 1662 CHECK_EQ(NULL, properties);
1663 const v8::HeapGraphNode* elements = 1663 const v8::HeapGraphNode* elements =
1664 GetProperty(global_object, v8::HeapGraphEdge::kInternal, "elements"); 1664 GetProperty(global_object, v8::HeapGraphEdge::kInternal, "elements");
1665 CHECK_EQ(NULL, elements); 1665 CHECK_EQ(NULL, elements);
1666 } 1666 }
OLDNEW
« no previous file with comments | « src/profile-generator-inl.h ('k') | test/cctest/test-list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698