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 "time/elapsed-timer.h" | |
35 | 34 |
36 namespace v8 { | 35 namespace v8 { |
37 namespace internal { | 36 namespace internal { |
38 | 37 |
39 // Logger is used for collecting logging information from V8 during | 38 // Logger is used for collecting logging information from V8 during |
40 // execution. The result is dumped to a file. | 39 // execution. The result is dumped to a file. |
41 // | 40 // |
42 // Available command line flags: | 41 // Available command line flags: |
43 // | 42 // |
44 // --log | 43 // --log |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 443 |
445 Log* log_; | 444 Log* log_; |
446 LowLevelLogger* ll_logger_; | 445 LowLevelLogger* ll_logger_; |
447 JitLogger* jit_logger_; | 446 JitLogger* jit_logger_; |
448 List<CodeEventListener*> listeners_; | 447 List<CodeEventListener*> listeners_; |
449 | 448 |
450 // Guards against multiple calls to TearDown() that can happen in some tests. | 449 // Guards against multiple calls to TearDown() that can happen in some tests. |
451 // 'true' between SetUp() and TearDown(). | 450 // 'true' between SetUp() and TearDown(). |
452 bool is_initialized_; | 451 bool is_initialized_; |
453 | 452 |
454 ElapsedTimer timer_; | 453 int64_t epoch_; |
455 | 454 |
456 friend class CpuProfiler; | 455 friend class CpuProfiler; |
457 }; | 456 }; |
458 | 457 |
459 | 458 |
460 class CodeEventListener { | 459 class CodeEventListener { |
461 public: | 460 public: |
462 virtual ~CodeEventListener() {} | 461 virtual ~CodeEventListener() {} |
463 | 462 |
464 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, | 463 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 int length) = 0; | 533 int length) = 0; |
535 | 534 |
536 NameBuffer* name_buffer_; | 535 NameBuffer* name_buffer_; |
537 }; | 536 }; |
538 | 537 |
539 | 538 |
540 } } // namespace v8::internal | 539 } } // namespace v8::internal |
541 | 540 |
542 | 541 |
543 #endif // V8_LOG_H_ | 542 #endif // V8_LOG_H_ |
OLD | NEW |