Commit 52bfe796 authored by jarin's avatar jarin Committed by Commit bot

[logging] Quickfix for uninitialized timer in code-deopt event.

Perhaps it would be better to always start the timer, but that
would require some refactoring of tests.

Review-Url: https://codereview.chromium.org/2786493006
Cr-Commit-Position: refs/heads/master@{#44425}
parent bff3b266
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment