Commit 1f03256d authored by ofrobots's avatar ofrobots Committed by Commit bot

fix assertion in Logger::CurrentTimeEvent with --prof

assertion did match the conditions under which this method gets called
(Runtime_DateCurrentTime). The bug got introduced as part of this change:
https://codereview.chromium.org/802333002

The assertion crash can be reproduced using:
% out/Debug/d8 --prof -e 'new Date();'

R=jkummerow@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1104303002

Cr-Commit-Position: refs/heads/master@{#28096}
parent 4d12e948
......@@ -904,7 +904,7 @@ void Logger::CodeDeoptEvent(Code* code, Address pc, int fp_to_sp_delta) {
void Logger::CurrentTimeEvent() {
if (!log_->IsEnabled()) return;
DCHECK(FLAG_log_internal_timer_events);
DCHECK(FLAG_log_timer_events || FLAG_prof_cpp);
Log::MessageBuilder msg(log_);
int since_epoch = static_cast<int>(timer_.Elapsed().InMicroseconds());
msg.Append("current-time,%ld", since_epoch);
......
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