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

Unified Diff: src/counters.cc

Issue 12040075: Log event start and event end separately when using --log-timer-events. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 months 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 | « no previous file | src/log.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 6d453d6aa3490ba20c0d62976aafe72392834b73..7c8265e9818e5e199101cf6d927d43642378531e 100644
--- a/src/counters.cc
+++ b/src/counters.cc
@@ -77,10 +77,13 @@ void* Histogram::CreateHistogram() const {
// Start the timer.
void HistogramTimer::Start() {
- if (histogram_.Enabled() || FLAG_log_internal_timer_events) {
+ if (histogram_.Enabled()) {
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.
@@ -92,8 +95,7 @@ void HistogramTimer::Stop() {
histogram_.AddSample(milliseconds);
}
if (FLAG_log_internal_timer_events) {
- LOG(Isolate::Current(),
- TimerEvent(histogram_.name_, start_time_, OS::Ticks()));
+ LOG(Isolate::Current(), TimerEvent(Logger::END, histogram_.name_));
}
}
« no previous file with comments | « no previous file | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698