Index: src/log.cc |
diff --git a/src/log.cc b/src/log.cc |
index c4c11b8907e8099de454344b3d7e9e61c44921b0..8e8a1f912a1cfd19886f487cd4ea210b9f594a50 100644 |
--- a/src/log.cc |
+++ b/src/log.cc |
@@ -848,7 +848,9 @@ void Logger::CodeDeoptEvent(Code* code, DeoptKind kind, Address pc, |
if (!log_->IsEnabled()) return; |
Deoptimizer::DeoptInfo info = Deoptimizer::GetDeoptInfo(code, pc); |
Log::MessageBuilder msg(log_); |
- int since_epoch = static_cast<int>(timer_.Elapsed().InMicroseconds()); |
+ int since_epoch = timer_.IsStarted() |
+ ? static_cast<int>(timer_.Elapsed().InMicroseconds()) |
+ : -1; |
msg.Append("code-deopt,%d,%d,", since_epoch, code->CodeSize()); |
msg.AppendAddress(code->address()); |