| OLD | NEW |
| 1 // Copyright 2009 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 | 5 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 6 | 6 |
| 7 #include "v8.h" | 7 #include "v8.h" |
| 8 |
| 9 #include "cctest.h" |
| 8 #include "heap-profiler.h" | 10 #include "heap-profiler.h" |
| 9 #include "snapshot.h" | 11 #include "snapshot.h" |
| 10 #include "string-stream.h" | 12 #include "string-stream.h" |
| 11 #include "cctest.h" | 13 #include "utils-inl.h" |
| 12 #include "zone-inl.h" | 14 #include "zone-inl.h" |
| 13 #include "../include/v8-profiler.h" | 15 #include "../include/v8-profiler.h" |
| 14 | 16 |
| 15 namespace i = v8::internal; | 17 namespace i = v8::internal; |
| 16 using i::ClustersCoarser; | 18 using i::ClustersCoarser; |
| 17 using i::JSObjectsCluster; | 19 using i::JSObjectsCluster; |
| 18 using i::JSObjectsRetainerTree; | 20 using i::JSObjectsRetainerTree; |
| 19 using i::JSObjectsClusterTree; | 21 using i::JSObjectsClusterTree; |
| 20 using i::RetainerHeapProfile; | 22 using i::RetainerHeapProfile; |
| 21 | 23 |
| (...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 const_cast<v8::HeapSnapshot*>(s2)->Delete(); | 1316 const_cast<v8::HeapSnapshot*>(s2)->Delete(); |
| 1315 CHECK_EQ(1, v8::HeapProfiler::GetSnapshotsCount()); | 1317 CHECK_EQ(1, v8::HeapProfiler::GetSnapshotsCount()); |
| 1316 CHECK_EQ(NULL, v8::HeapProfiler::FindSnapshot(uid2)); | 1318 CHECK_EQ(NULL, v8::HeapProfiler::FindSnapshot(uid2)); |
| 1317 CHECK_EQ(s3, v8::HeapProfiler::FindSnapshot(uid3)); | 1319 CHECK_EQ(s3, v8::HeapProfiler::FindSnapshot(uid3)); |
| 1318 const_cast<v8::HeapSnapshot*>(s3)->Delete(); | 1320 const_cast<v8::HeapSnapshot*>(s3)->Delete(); |
| 1319 CHECK_EQ(0, v8::HeapProfiler::GetSnapshotsCount()); | 1321 CHECK_EQ(0, v8::HeapProfiler::GetSnapshotsCount()); |
| 1320 CHECK_EQ(NULL, v8::HeapProfiler::FindSnapshot(uid3)); | 1322 CHECK_EQ(NULL, v8::HeapProfiler::FindSnapshot(uid3)); |
| 1321 } | 1323 } |
| 1322 | 1324 |
| 1323 #endif // ENABLE_LOGGING_AND_PROFILING | 1325 #endif // ENABLE_LOGGING_AND_PROFILING |
| OLD | NEW |