| Index: src/log.h
|
| ===================================================================
|
| --- src/log.h (revision 2260)
|
| +++ src/log.h (working copy)
|
| @@ -28,6 +28,9 @@
|
| #ifndef V8_LOG_H_
|
| #define V8_LOG_H_
|
|
|
| +#include "platform.h"
|
| +#include "log-utils.h"
|
| +
|
| namespace v8 {
|
| namespace internal {
|
|
|
| @@ -77,7 +80,7 @@
|
| #ifdef ENABLE_LOGGING_AND_PROFILING
|
| #define LOG(Call) \
|
| do { \
|
| - if (v8::internal::Logger::IsEnabled()) \
|
| + if (v8::internal::Logger::is_logging()) \
|
| v8::internal::Logger::Call; \
|
| } while (false)
|
| #else
|
| @@ -88,12 +91,13 @@
|
| class VMState BASE_EMBEDDED {
|
| #ifdef ENABLE_LOGGING_AND_PROFILING
|
| public:
|
| - explicit VMState(StateTag state);
|
| - ~VMState();
|
| + inline explicit VMState(StateTag state);
|
| + inline ~VMState();
|
|
|
| StateTag state() { return state_; }
|
|
|
| private:
|
| + bool disabled_;
|
| StateTag state_;
|
| VMState* previous_;
|
| #else
|
| @@ -236,7 +240,9 @@
|
| return current_state_ ? current_state_->state() : OTHER;
|
| }
|
|
|
| - static bool IsEnabled();
|
| + static bool is_logging() {
|
| + return is_logging_;
|
| + }
|
|
|
| // Pause/Resume collection of profiling data.
|
| // When data collection is paused, Tick events are discarded until
|
| @@ -317,8 +323,10 @@
|
| friend class VMState;
|
|
|
| friend class LoggerTestHelper;
|
| +
|
| + static bool is_logging_;
|
| #else
|
| - static bool is_enabled() { return false; }
|
| + static bool is_logging() { return false; }
|
| #endif
|
| };
|
|
|
|
|