Commit 4a26804c authored by Alexei Filippov's avatar Alexei Filippov Committed by Commit Bot

[runtime-call-stats] Remove debug dumps.

No more crashes are seen in the RuntimeCallStats::Leave function. So
we can remove the debug info.

BUG=chromium:760649

Change-Id: If0a5f4ebf9ae359e3b8180ef2f8d37cab8659b06
Reviewed-on: https://chromium-review.googlesource.com/747483Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49091}
parent 586067e4
...@@ -476,7 +476,7 @@ const int RuntimeCallStats::counters_count = ...@@ -476,7 +476,7 @@ const int RuntimeCallStats::counters_count =
// static // static
void RuntimeCallStats::Enter(RuntimeCallStats* stats, RuntimeCallTimer* timer, void RuntimeCallStats::Enter(RuntimeCallStats* stats, RuntimeCallTimer* timer,
CounterId counter_id) { CounterId counter_id) {
CHECK(stats->IsCalledOnTheSameThread()); DCHECK(stats->IsCalledOnTheSameThread());
RuntimeCallCounter* counter = &(stats->*counter_id); RuntimeCallCounter* counter = &(stats->*counter_id);
DCHECK_NOT_NULL(counter->name()); DCHECK_NOT_NULL(counter->name());
timer->Start(counter, stats->current_timer()); timer->Start(counter, stats->current_timer());
...@@ -486,17 +486,10 @@ void RuntimeCallStats::Enter(RuntimeCallStats* stats, RuntimeCallTimer* timer, ...@@ -486,17 +486,10 @@ void RuntimeCallStats::Enter(RuntimeCallStats* stats, RuntimeCallTimer* timer,
// static // static
void RuntimeCallStats::Leave(RuntimeCallStats* stats, RuntimeCallTimer* timer) { void RuntimeCallStats::Leave(RuntimeCallStats* stats, RuntimeCallTimer* timer) {
CHECK(stats->IsCalledOnTheSameThread()); DCHECK(stats->IsCalledOnTheSameThread());
RuntimeCallTimer* stack_top = stats->current_timer(); RuntimeCallTimer* stack_top = stats->current_timer();
if (stack_top == nullptr) return; // Missing timer is a result of Reset(). if (stack_top == nullptr) return; // Missing timer is a result of Reset().
if (stack_top != timer) { CHECK(stack_top == 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(), stack_top->name());
USE(text);
CHECK(false);
}
stats->current_timer_.SetValue(timer->Stop()); stats->current_timer_.SetValue(timer->Stop());
RuntimeCallTimer* cur_timer = stats->current_timer(); RuntimeCallTimer* cur_timer = stats->current_timer();
stats->current_counter_.SetValue(cur_timer ? cur_timer->counter() : nullptr); stats->current_counter_.SetValue(cur_timer ? cur_timer->counter() : nullptr);
...@@ -514,6 +507,7 @@ void RuntimeCallStats::Add(RuntimeCallStats* other) { ...@@ -514,6 +507,7 @@ void RuntimeCallStats::Add(RuntimeCallStats* other) {
// static // static
void RuntimeCallStats::CorrectCurrentCounterId(RuntimeCallStats* stats, void RuntimeCallStats::CorrectCurrentCounterId(RuntimeCallStats* stats,
CounterId counter_id) { CounterId counter_id) {
DCHECK(stats->IsCalledOnTheSameThread());
// When RCS are enabled dynamically there might be no stats or timer set up. // When RCS are enabled dynamically there might be no stats or timer set up.
if (stats == nullptr) return; if (stats == nullptr) return;
RuntimeCallTimer* timer = stats->current_timer_.Value(); RuntimeCallTimer* timer = stats->current_timer_.Value();
......
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