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

Unified Diff: src/log.h

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: moar timers 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
Index: src/log.h
diff --git a/src/log.h b/src/log.h
index 33f359a7f996be80842fe7a6d6e7f685ed68ac03..ce5064df8c1e66d733d8d63c33a4e5917a94caef 100644
--- a/src/log.h
+++ b/src/log.h
@@ -274,6 +274,25 @@ class Logger {
void SharedLibraryEvent(const wchar_t* library_path,
uintptr_t start,
uintptr_t end);
+ void TimerEvent(const char* name, int64_t start, int64_t end);
+
+ class TimerEventScope {
+ public:
+ TimerEventScope(Logger* logger, const char* name)
+ : logger_(logger), name_(name), start_(0) {
+ if (FLAG_log_timer_events) start_ = OS::Ticks();
+ }
+
+ ~TimerEventScope() {
+ if (FLAG_log_timer_events) {
+ logger_->TimerEvent(name_, start_, OS::Ticks());
+ }
+ }
+
+ Logger* logger_;
Jakob Kummerow 2012/11/22 10:56:08 "private:"?
Yang 2012/11/22 13:04:20 Done.
+ const char* name_;
+ int64_t start_;
+ };
// ==== Events logged by --log-regexp ====
// Regexp compilation and execution events.
@@ -449,6 +468,8 @@ class Logger {
// Logger::FunctionCreateEvent(...)
Address prev_code_;
+ int64_t epoch_;
+
friend class CpuProfiler;
};

Powered by Google App Engine
This is Rietveld 408576698