OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // | 2 // |
3 // Tests of profiles generator and utilities. | 3 // Tests of profiles generator and utilities. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 #include "cpu-profiler-inl.h" | 6 #include "cpu-profiler-inl.h" |
7 #include "cctest.h" | 7 #include "cctest.h" |
8 #include "../include/v8-profiler.h" | 8 #include "../include/v8-profiler.h" |
9 | 9 |
10 namespace i = v8::internal; | |
11 | |
12 using i::CodeEntry; | 10 using i::CodeEntry; |
13 using i::CpuProfile; | 11 using i::CpuProfile; |
14 using i::CpuProfiler; | 12 using i::CpuProfiler; |
15 using i::CpuProfilesCollection; | 13 using i::CpuProfilesCollection; |
16 using i::ProfileGenerator; | 14 using i::ProfileGenerator; |
17 using i::ProfileNode; | 15 using i::ProfileNode; |
18 using i::ProfilerEventsProcessor; | 16 using i::ProfilerEventsProcessor; |
19 using i::TokenEnumerator; | 17 using i::TokenEnumerator; |
20 | 18 |
21 | 19 |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 CHECK_EQ(NULL, v8::CpuProfiler::FindProfile(uid2)); | 390 CHECK_EQ(NULL, v8::CpuProfiler::FindProfile(uid2)); |
393 CHECK_EQ(p3, v8::CpuProfiler::FindProfile(uid3)); | 391 CHECK_EQ(p3, v8::CpuProfiler::FindProfile(uid3)); |
394 const_cast<v8::CpuProfile*>(p2)->Delete(); | 392 const_cast<v8::CpuProfile*>(p2)->Delete(); |
395 CHECK_EQ(1, v8::CpuProfiler::GetProfilesCount()); | 393 CHECK_EQ(1, v8::CpuProfiler::GetProfilesCount()); |
396 CHECK_EQ(NULL, v8::CpuProfiler::FindProfile(uid2)); | 394 CHECK_EQ(NULL, v8::CpuProfiler::FindProfile(uid2)); |
397 CHECK_EQ(p3, v8::CpuProfiler::FindProfile(uid3)); | 395 CHECK_EQ(p3, v8::CpuProfiler::FindProfile(uid3)); |
398 const_cast<v8::CpuProfile*>(p3)->Delete(); | 396 const_cast<v8::CpuProfile*>(p3)->Delete(); |
399 CHECK_EQ(0, CpuProfiler::GetProfilesCount()); | 397 CHECK_EQ(0, CpuProfiler::GetProfilesCount()); |
400 CHECK_EQ(NULL, v8::CpuProfiler::FindProfile(uid3)); | 398 CHECK_EQ(NULL, v8::CpuProfiler::FindProfile(uid3)); |
401 } | 399 } |
OLD | NEW |