Index: src/log.cc |
diff --git a/src/log.cc b/src/log.cc |
index 92b80542abdf9996bfe1c01849e93ae2a65fbef2..f20254f9167bc68250656cad2336440a0d06ede0 100644 |
--- a/src/log.cc |
+++ b/src/log.cc |
@@ -706,6 +706,7 @@ void Logger::SharedLibraryEvent(const wchar_t* library_path, |
void Logger::TimerEvent(const char* name, int64_t start, int64_t end) { |
+ if (!log_->IsEnabled()) return; |
ASSERT(FLAG_log_timer_events); |
LogMessageBuilder msg(this); |
int since_epoch = static_cast<int>(start - epoch_); |
@@ -715,6 +716,14 @@ void Logger::TimerEvent(const char* name, int64_t start, int64_t end) { |
} |
+void Logger::TimerEventScope::LogTimerEvent() { |
+ Logger* logger = isolate_->logger(); |
+ if (logger->is_logging()) { |
+ logger->TimerEvent(name_, start_, OS::Ticks()); |
+ } |
+} |
+ |
+ |
const char* Logger::TimerEventScope::v8_recompile_synchronous = |
"V8.RecompileSynchronous"; |
const char* Logger::TimerEventScope::v8_recompile_parallel = |