diff options
Diffstat (limited to 'deps/v8/src/counters.cc')
-rw-r--r-- | deps/v8/src/counters.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/v8/src/counters.cc b/deps/v8/src/counters.cc index 811c0aa2e..7c8265e98 100644 --- a/deps/v8/src/counters.cc +++ b/deps/v8/src/counters.cc @@ -81,17 +81,22 @@ void HistogramTimer::Start() { stop_time_ = 0; start_time_ = OS::Ticks(); } + if (FLAG_log_internal_timer_events) { + LOG(Isolate::Current(), TimerEvent(Logger::START, histogram_.name_)); + } } // Stop the timer and record the results. void HistogramTimer::Stop() { if (histogram_.Enabled()) { stop_time_ = OS::Ticks(); - // Compute the delta between start and stop, in milliseconds. int milliseconds = static_cast<int>(stop_time_ - start_time_) / 1000; histogram_.AddSample(milliseconds); } + if (FLAG_log_internal_timer_events) { + LOG(Isolate::Current(), TimerEvent(Logger::END, histogram_.name_)); + } } } } // namespace v8::internal |