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

Unified Diff: src/log.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/log.h ('k') | src/log-utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index b049ffe4eb7557ec879050b975896a887a1a6d4c..92b80542abdf9996bfe1c01849e93ae2a65fbef2 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -531,7 +531,8 @@ Logger::Logger()
prev_sp_(NULL),
prev_function_(NULL),
prev_to_(NULL),
- prev_code_(NULL) {
+ prev_code_(NULL),
+ epoch_(0) {
}
@@ -704,6 +705,25 @@ void Logger::SharedLibraryEvent(const wchar_t* library_path,
}
+void Logger::TimerEvent(const char* name, int64_t start, int64_t end) {
+ ASSERT(FLAG_log_timer_events);
+ LogMessageBuilder msg(this);
+ int since_epoch = static_cast<int>(start - epoch_);
+ int pause_time = static_cast<int>(end - start);
+ msg.Append("timer-event,\"%s\",%ld,%ld\n", name, since_epoch, pause_time);
+ msg.WriteToLogFile();
+}
+
+
+const char* Logger::TimerEventScope::v8_recompile_synchronous =
+ "V8.RecompileSynchronous";
+const char* Logger::TimerEventScope::v8_recompile_parallel =
+ "V8.RecompileParallel";
+const char* Logger::TimerEventScope::v8_compile_full_code =
+ "V8.CompileFullCode";
+const char* Logger::TimerEventScope::v8_execute = "V8.Execute";
+
+
void Logger::LogRegExpSource(Handle<JSRegExp> regexp) {
// Prints "/" + re.source + "/" +
// (re.global?"g":"") + (re.ignorecase?"i":"") + (re.multiline?"m":"")
@@ -1727,7 +1747,8 @@ bool Logger::SetUp() {
bool start_logging = FLAG_log || FLAG_log_runtime || FLAG_log_api
|| FLAG_log_code || FLAG_log_gc || FLAG_log_handles || FLAG_log_suspect
- || FLAG_log_regexp || FLAG_log_state_changes || FLAG_ll_prof;
+ || FLAG_log_regexp || FLAG_log_state_changes || FLAG_ll_prof
+ || FLAG_log_timer_events;
if (start_logging) {
logging_nesting_ = 1;
@@ -1745,6 +1766,8 @@ bool Logger::SetUp() {
}
}
+ if (FLAG_log_timer_events) epoch_ = OS::Ticks();
+
return true;
}
« no previous file with comments | « src/log.h ('k') | src/log-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698