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 #ifdef ENABLE_LOGGING_AND_PROFILING | |
6 | |
7 #include "v8.h" | 5 #include "v8.h" |
8 #include "cpu-profiler-inl.h" | 6 #include "cpu-profiler-inl.h" |
9 #include "cctest.h" | 7 #include "cctest.h" |
10 #include "../include/v8-profiler.h" | 8 #include "../include/v8-profiler.h" |
11 | 9 |
12 namespace i = v8::internal; | 10 namespace i = v8::internal; |
13 | 11 |
14 using i::CodeEntry; | 12 using i::CodeEntry; |
15 using i::CpuProfile; | 13 using i::CpuProfile; |
16 using i::CpuProfiler; | 14 using i::CpuProfiler; |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 CHECK_EQ(NULL, v8::CpuProfiler::FindProfile(uid2)); | 392 CHECK_EQ(NULL, v8::CpuProfiler::FindProfile(uid2)); |
395 CHECK_EQ(p3, v8::CpuProfiler::FindProfile(uid3)); | 393 CHECK_EQ(p3, v8::CpuProfiler::FindProfile(uid3)); |
396 const_cast<v8::CpuProfile*>(p2)->Delete(); | 394 const_cast<v8::CpuProfile*>(p2)->Delete(); |
397 CHECK_EQ(1, v8::CpuProfiler::GetProfilesCount()); | 395 CHECK_EQ(1, v8::CpuProfiler::GetProfilesCount()); |
398 CHECK_EQ(NULL, v8::CpuProfiler::FindProfile(uid2)); | 396 CHECK_EQ(NULL, v8::CpuProfiler::FindProfile(uid2)); |
399 CHECK_EQ(p3, v8::CpuProfiler::FindProfile(uid3)); | 397 CHECK_EQ(p3, v8::CpuProfiler::FindProfile(uid3)); |
400 const_cast<v8::CpuProfile*>(p3)->Delete(); | 398 const_cast<v8::CpuProfile*>(p3)->Delete(); |
401 CHECK_EQ(0, CpuProfiler::GetProfilesCount()); | 399 CHECK_EQ(0, CpuProfiler::GetProfilesCount()); |
402 CHECK_EQ(NULL, v8::CpuProfiler::FindProfile(uid3)); | 400 CHECK_EQ(NULL, v8::CpuProfiler::FindProfile(uid3)); |
403 } | 401 } |
404 | |
405 #endif // ENABLE_LOGGING_AND_PROFILING | |
OLD | NEW |