| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_LOG_H_ | 5 #ifndef V8_LOG_H_ |
| 6 #define V8_LOG_H_ | 6 #define V8_LOG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 V(NATIVE_FUNCTION_TAG, "Function") \ | 138 V(NATIVE_FUNCTION_TAG, "Function") \ |
| 139 V(NATIVE_LAZY_COMPILE_TAG, "LazyCompile") \ | 139 V(NATIVE_LAZY_COMPILE_TAG, "LazyCompile") \ |
| 140 V(NATIVE_SCRIPT_TAG, "Script") | 140 V(NATIVE_SCRIPT_TAG, "Script") |
| 141 // Note that 'NATIVE_' cases for functions and scripts are mapped onto | 141 // Note that 'NATIVE_' cases for functions and scripts are mapped onto |
| 142 // original tags when writing to the log. | 142 // original tags when writing to the log. |
| 143 | 143 |
| 144 | 144 |
| 145 class JitLogger; | 145 class JitLogger; |
| 146 class PerfBasicLogger; | 146 class PerfBasicLogger; |
| 147 class LowLevelLogger; | 147 class LowLevelLogger; |
| 148 class PerfJitLogger; |
| 148 class Sampler; | 149 class Sampler; |
| 149 | 150 |
| 150 class Logger { | 151 class Logger { |
| 151 public: | 152 public: |
| 152 enum StartEnd { START = 0, END = 1 }; | 153 enum StartEnd { START = 0, END = 1 }; |
| 153 | 154 |
| 154 #define DECLARE_ENUM(enum_item, ignore) enum_item, | 155 #define DECLARE_ENUM(enum_item, ignore) enum_item, |
| 155 enum LogEventsAndTags { | 156 enum LogEventsAndTags { |
| 156 LOG_EVENTS_AND_TAGS_LIST(DECLARE_ENUM) | 157 LOG_EVENTS_AND_TAGS_LIST(DECLARE_ENUM) |
| 157 NUMBER_OF_LOG_EVENTS | 158 NUMBER_OF_LOG_EVENTS |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 friend class EventLog; | 387 friend class EventLog; |
| 387 friend class Isolate; | 388 friend class Isolate; |
| 388 friend class TimeLog; | 389 friend class TimeLog; |
| 389 friend class Profiler; | 390 friend class Profiler; |
| 390 template <StateTag Tag> friend class VMState; | 391 template <StateTag Tag> friend class VMState; |
| 391 friend class LoggerTestHelper; | 392 friend class LoggerTestHelper; |
| 392 | 393 |
| 393 bool is_logging_; | 394 bool is_logging_; |
| 394 Log* log_; | 395 Log* log_; |
| 395 PerfBasicLogger* perf_basic_logger_; | 396 PerfBasicLogger* perf_basic_logger_; |
| 397 PerfJitLogger* perf_jit_logger_; |
| 396 LowLevelLogger* ll_logger_; | 398 LowLevelLogger* ll_logger_; |
| 397 JitLogger* jit_logger_; | 399 JitLogger* jit_logger_; |
| 398 List<CodeEventListener*> listeners_; | 400 List<CodeEventListener*> listeners_; |
| 399 | 401 |
| 400 // Guards against multiple calls to TearDown() that can happen in some tests. | 402 // Guards against multiple calls to TearDown() that can happen in some tests. |
| 401 // 'true' between SetUp() and TearDown(). | 403 // 'true' between SetUp() and TearDown(). |
| 402 bool is_initialized_; | 404 bool is_initialized_; |
| 403 | 405 |
| 404 base::ElapsedTimer timer_; | 406 base::ElapsedTimer timer_; |
| 405 | 407 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 527 |
| 526 NameBuffer* name_buffer_; | 528 NameBuffer* name_buffer_; |
| 527 }; | 529 }; |
| 528 | 530 |
| 529 | 531 |
| 530 } // namespace internal | 532 } // namespace internal |
| 531 } // namespace v8 | 533 } // namespace v8 |
| 532 | 534 |
| 533 | 535 |
| 534 #endif // V8_LOG_H_ | 536 #endif // V8_LOG_H_ |
| OLD | NEW |