Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: src/log.cc

Issue 2786493006: [logging] Quickfix for uninitialized timer in code-deopt event. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698