OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
2 // | 2 // |
3 // Tests of logging functions from log.h | 3 // Tests of logging functions from log.h |
4 | 4 |
5 #ifdef ENABLE_LOGGING_AND_PROFILING | 5 #ifdef ENABLE_LOGGING_AND_PROFILING |
6 | 6 |
7 #ifdef __linux__ | 7 #ifdef __linux__ |
8 #include <math.h> | 8 #include <math.h> |
9 #include <pthread.h> | 9 #include <pthread.h> |
10 #include <signal.h> | 10 #include <signal.h> |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 sampler.Start(); | 462 sampler.Start(); |
463 CHECK(!sampler.WasSampleStackCalled()); | 463 CHECK(!sampler.WasSampleStackCalled()); |
464 jsThread.WaitForRunning(); | 464 jsThread.WaitForRunning(); |
465 jsThread.SendSigProf(); | 465 jsThread.SendSigProf(); |
466 CHECK(sampler.WaitForTick()); | 466 CHECK(sampler.WaitForTick()); |
467 CHECK(sampler.WasSampleStackCalled()); | 467 CHECK(sampler.WasSampleStackCalled()); |
468 sampler.Reset(); | 468 sampler.Reset(); |
469 CHECK(!sampler.WasSampleStackCalled()); | 469 CHECK(!sampler.WasSampleStackCalled()); |
470 nonJsThread.WaitForRunning(); | 470 nonJsThread.WaitForRunning(); |
471 nonJsThread.SendSigProf(); | 471 nonJsThread.SendSigProf(); |
472 CHECK(sampler.WaitForTick()); | 472 CHECK(!sampler.WaitForTick()); |
473 CHECK(!sampler.WasSampleStackCalled()); | 473 CHECK(!sampler.WasSampleStackCalled()); |
474 sampler.Stop(); | 474 sampler.Stop(); |
475 | 475 |
476 jsThread.Stop(); | 476 jsThread.Stop(); |
477 nonJsThread.Stop(); | 477 nonJsThread.Stop(); |
478 jsThread.Join(); | 478 jsThread.Join(); |
479 nonJsThread.Join(); | 479 nonJsThread.Join(); |
480 } | 480 } |
481 | 481 |
482 #endif // __linux__ | 482 #endif // __linux__ |
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 // Make sure that all log data is written prior crash due to CHECK failure. | 1189 // Make sure that all log data is written prior crash due to CHECK failure. |
1190 fflush(stdout); | 1190 fflush(stdout); |
1191 CHECK(results_equal); | 1191 CHECK(results_equal); |
1192 | 1192 |
1193 env->Exit(); | 1193 env->Exit(); |
1194 Logger::TearDown(); | 1194 Logger::TearDown(); |
1195 i::FLAG_always_compact = saved_always_compact; | 1195 i::FLAG_always_compact = saved_always_compact; |
1196 } | 1196 } |
1197 | 1197 |
1198 #endif // ENABLE_LOGGING_AND_PROFILING | 1198 #endif // ENABLE_LOGGING_AND_PROFILING |
OLD | NEW |