Commit ca81e114 authored by Alexei Filippov's avatar Alexei Filippov Committed by Commit Bot

[runtime-call-stats] Add extra logging to catch remaining crashes.

BUG=chromium:760649

Change-Id: I13f3ad28ce3870ef57aa53eef684727656dcdff2
Reviewed-on: https://chromium-review.googlesource.com/701264
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48321}
parent 0717ff34
......@@ -488,7 +488,14 @@ void RuntimeCallStats::Enter(RuntimeCallStats* stats, RuntimeCallTimer* timer,
// static
void RuntimeCallStats::Leave(RuntimeCallStats* stats, RuntimeCallTimer* timer) {
DCHECK(ThreadId::Current().Equals(stats->thread_id()));
CHECK(stats->current_timer_.Value() == timer);
if (stats->current_timer_.Value() != timer) {
// The branch is added to catch a crash crbug.com/760649
EmbeddedVector<char, 200> text;
SNPrintF(text, "ERROR: Leaving counter '%s', stack top '%s'.\n",
timer->name(), stats->current_timer_.Value()->name());
USE(text);
CHECK(false);
}
stats->current_timer_.SetValue(timer->Stop());
RuntimeCallTimer* cur_timer = stats->current_timer_.Value();
stats->current_counter_.SetValue(cur_timer ? cur_timer->counter() : nullptr);
......
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