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

Unified Diff: src/log.cc

Issue 11411224: Also time external callbacks from generated code. (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/x64/macro-assembler-x64.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 a40bd92f392a45805ac98ec78957afe7d085c257..76af40067a21779d2b090806d5c3c68c448d8c24 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -727,6 +727,19 @@ void Logger::ExternalSwitch(StateTag old_tag, StateTag new_tag) {
}
+void Logger::EnterExternal() {
+ LOGGER->enter_external_ = OS::Ticks();
+}
+
+
+void Logger::LeaveExternal() {
+ if (enter_external_ == 0) return;
+ Logger* logger = LOGGER;
+ logger->TimerEvent("V8.External", enter_external_, OS::Ticks());
+ logger->enter_external_ = 0;
+}
+
+
int64_t Logger::enter_external_ = 0;
« no previous file with comments | « src/log.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698