| OLD | NEW |
| 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 #ifdef ENABLE_LOGGING_AND_PROFILING | |
| 6 | |
| 7 #include "v8.h" | 5 #include "v8.h" |
| 8 | 6 |
| 9 #include "cctest.h" | 7 #include "cctest.h" |
| 10 #include "heap-profiler.h" | 8 #include "heap-profiler.h" |
| 11 #include "snapshot.h" | 9 #include "snapshot.h" |
| 12 #include "utils-inl.h" | 10 #include "utils-inl.h" |
| 13 #include "../include/v8-profiler.h" | 11 #include "../include/v8-profiler.h" |
| 14 | 12 |
| 15 namespace i = v8::internal; | 13 namespace i = v8::internal; |
| 16 | 14 |
| (...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 CHECK_NE(NULL, global); | 884 CHECK_NE(NULL, global); |
| 887 // Verify that we can find this object by iteration. | 885 // Verify that we can find this object by iteration. |
| 888 const int nodes_count = snapshot->GetNodesCount(); | 886 const int nodes_count = snapshot->GetNodesCount(); |
| 889 int count = 0; | 887 int count = 0; |
| 890 for (int i = 0; i < nodes_count; ++i) { | 888 for (int i = 0; i < nodes_count; ++i) { |
| 891 if (snapshot->GetNode(i) == global) | 889 if (snapshot->GetNode(i) == global) |
| 892 ++count; | 890 ++count; |
| 893 } | 891 } |
| 894 CHECK_EQ(1, count); | 892 CHECK_EQ(1, count); |
| 895 } | 893 } |
| 896 | |
| 897 #endif // ENABLE_LOGGING_AND_PROFILING | |
| OLD | NEW |