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

Unified Diff: src/counters.cc

Issue 11412125: Add parallel recompilation time to histogram and plot execution pause times. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: make new counters non-histograms Created 8 years, 1 month 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 | « src/compiler.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/counters.cc
diff --git a/src/counters.cc b/src/counters.cc
index 811c0aa2e62038cc997a2fe1c0859b60fe02f7e2..db8a1237e958a4ca68fc08f6862d6c8bf3c9cb54 100644
--- a/src/counters.cc
+++ b/src/counters.cc
@@ -77,7 +77,7 @@ void* Histogram::CreateHistogram() const {
// Start the timer.
void HistogramTimer::Start() {
- if (histogram_.Enabled()) {
+ if (histogram_.Enabled() || FLAG_log_timer_events) {
stop_time_ = 0;
start_time_ = OS::Ticks();
}
@@ -87,11 +87,15 @@ void HistogramTimer::Start() {
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_timer_events) {
+ stop_time_ = OS::Ticks();
+ Isolate::Current()->logger()->TimerEvent(
+ histogram_.name_, start_time_, stop_time_);
+ }
}
} } // namespace v8::internal
« no previous file with comments | « src/compiler.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698