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

Unified Diff: src/log.cc

Issue 11411144: Also time other API functions calling into javascript. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 92b80542abdf9996bfe1c01849e93ae2a65fbef2..f20254f9167bc68250656cad2336440a0d06ede0 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -706,6 +706,7 @@ void Logger::SharedLibraryEvent(const wchar_t* library_path,
void Logger::TimerEvent(const char* name, int64_t start, int64_t end) {
+ if (!log_->IsEnabled()) return;
ASSERT(FLAG_log_timer_events);
LogMessageBuilder msg(this);
int since_epoch = static_cast<int>(start - epoch_);
@@ -715,6 +716,14 @@ void Logger::TimerEvent(const char* name, int64_t start, int64_t end) {
}
+void Logger::TimerEventScope::LogTimerEvent() {
+ Logger* logger = isolate_->logger();
+ if (logger->is_logging()) {
+ logger->TimerEvent(name_, start_, OS::Ticks());
+ }
+}
+
+
const char* Logger::TimerEventScope::v8_recompile_synchronous =
"V8.RecompileSynchronous";
const char* Logger::TimerEventScope::v8_recompile_parallel =
« 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