OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 13 matching lines...) Expand all Loading... |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #ifndef V8_LOG_H_ | 28 #ifndef V8_LOG_H_ |
29 #define V8_LOG_H_ | 29 #define V8_LOG_H_ |
30 | 30 |
31 #include "allocation.h" | 31 #include "allocation.h" |
32 #include "objects.h" | 32 #include "objects.h" |
33 #include "platform.h" | 33 #include "platform.h" |
| 34 #include "platform/elapsed-timer.h" |
34 | 35 |
35 namespace v8 { | 36 namespace v8 { |
36 namespace internal { | 37 namespace internal { |
37 | 38 |
38 // Logger is used for collecting logging information from V8 during | 39 // Logger is used for collecting logging information from V8 during |
39 // execution. The result is dumped to a file. | 40 // execution. The result is dumped to a file. |
40 // | 41 // |
41 // Available command line flags: | 42 // Available command line flags: |
42 // | 43 // |
43 // --log | 44 // --log |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 | 444 |
444 Log* log_; | 445 Log* log_; |
445 LowLevelLogger* ll_logger_; | 446 LowLevelLogger* ll_logger_; |
446 JitLogger* jit_logger_; | 447 JitLogger* jit_logger_; |
447 List<CodeEventListener*> listeners_; | 448 List<CodeEventListener*> listeners_; |
448 | 449 |
449 // Guards against multiple calls to TearDown() that can happen in some tests. | 450 // Guards against multiple calls to TearDown() that can happen in some tests. |
450 // 'true' between SetUp() and TearDown(). | 451 // 'true' between SetUp() and TearDown(). |
451 bool is_initialized_; | 452 bool is_initialized_; |
452 | 453 |
453 int64_t epoch_; | 454 ElapsedTimer timer_; |
454 | 455 |
455 friend class CpuProfiler; | 456 friend class CpuProfiler; |
456 }; | 457 }; |
457 | 458 |
458 | 459 |
459 class CodeEventListener { | 460 class CodeEventListener { |
460 public: | 461 public: |
461 virtual ~CodeEventListener() {} | 462 virtual ~CodeEventListener() {} |
462 | 463 |
463 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, | 464 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 int length) = 0; | 534 int length) = 0; |
534 | 535 |
535 NameBuffer* name_buffer_; | 536 NameBuffer* name_buffer_; |
536 }; | 537 }; |
537 | 538 |
538 | 539 |
539 } } // namespace v8::internal | 540 } } // namespace v8::internal |
540 | 541 |
541 | 542 |
542 #endif // V8_LOG_H_ | 543 #endif // V8_LOG_H_ |
OLD | NEW |