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

Unified Diff: src/log.h

Issue 382043003: Add ExternalTimerEventScope to log non internal timer events scopes (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Minor fix Created 6 years, 5 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 | « src/ic.cc ('k') | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.h
diff --git a/src/log.h b/src/log.h
index e98874b5baaa2354a2f7990f039b29e40473dfb1..7eda0ce0fa0d276bb5a0d8672eac19bb79ab1700 100644
--- a/src/log.h
+++ b/src/log.h
@@ -325,6 +325,24 @@ class Logger {
const char* name_;
};
+ class ExternalTimerEventScope {
+ public:
+ ExternalTimerEventScope(Isolate* isolate, const char* name)
+ : isolate_(isolate), name_(name) {
+ LogTimerEvent(START);
+ }
+
+ ~ExternalTimerEventScope() {
+ LogTimerEvent(END);
+ }
+
+ void LogTimerEvent(StartEnd se);
+
+ private:
+ Isolate* isolate_;
+ const char* name_;
+ };
+
// ==== Events logged by --log-regexp ====
// Regexp compilation and execution events.
« no previous file with comments | « src/ic.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698