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

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

Issue 7618040: Version 3.5.5. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 4 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 | « test/cctest/test-cpu-profiler.cc ('k') | test/cctest/test-log.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 "v8.h" 5 #include "v8.h"
6 6
7 #include "cctest.h" 7 #include "cctest.h"
8 #include "heap-profiler.h" 8 #include "heap-profiler.h"
9 #include "snapshot.h" 9 #include "snapshot.h"
10 #include "utils-inl.h" 10 #include "utils-inl.h"
11 #include "../include/v8-profiler.h" 11 #include "../include/v8-profiler.h"
12 12
13 namespace i = v8::internal;
14
15 namespace { 13 namespace {
16 14
17 class NamedEntriesDetector { 15 class NamedEntriesDetector {
18 public: 16 public:
19 NamedEntriesDetector() 17 NamedEntriesDetector()
20 : has_A2(false), has_B2(false), has_C2(false) { 18 : has_A2(false), has_B2(false), has_C2(false) {
21 } 19 }
22 20
23 void Apply(i::HeapEntry** entry_ptr) { 21 void Apply(i::HeapEntry** entry_ptr) {
24 if (IsReachableNodeWithName(*entry_ptr, "A2")) has_A2 = true; 22 if (IsReachableNodeWithName(*entry_ptr, "A2")) has_A2 = true;
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 CHECK_NE(NULL, global); 882 CHECK_NE(NULL, global);
885 // Verify that we can find this object by iteration. 883 // Verify that we can find this object by iteration.
886 const int nodes_count = snapshot->GetNodesCount(); 884 const int nodes_count = snapshot->GetNodesCount();
887 int count = 0; 885 int count = 0;
888 for (int i = 0; i < nodes_count; ++i) { 886 for (int i = 0; i < nodes_count; ++i) {
889 if (snapshot->GetNode(i) == global) 887 if (snapshot->GetNode(i) == global)
890 ++count; 888 ++count;
891 } 889 }
892 CHECK_EQ(1, count); 890 CHECK_EQ(1, count);
893 } 891 }
OLDNEW
« no previous file with comments | « test/cctest/test-cpu-profiler.cc ('k') | test/cctest/test-log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698