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

Unified Diff: src/log.h

Issue 186163002: Add support for allowing an embedder to get the V8 profile timer event logs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Renamings Created 6 years, 10 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
Index: src/log.h
diff --git a/src/log.h b/src/log.h
index d4dc76a21cc5222139e209646505caf90534d16a..e5ba111de64bca624eafd9a348120b48532ee7b4 100644
--- a/src/log.h
+++ b/src/log.h
@@ -99,6 +99,13 @@ struct TickSample;
logger->Call; \
} while (false)
+#define LOG_EVENT_BEGIN(isolate, name) \
+ if ((isolate)->event_logger()) \
+ (isolate)->event_logger()(name, 0)
Sven Panne 2014/03/05 07:47:29 Parenthesize "name" and never ever use unbalanced
Yang 2014/03/05 08:18:31 Agree.
fmeawad 2014/03/06 00:24:46 Moved to an inlined function in Patch 5, and total
+
+#define LOG_EVENT_END(isolate, name) \
+ if ((isolate)->event_logger()) \
+ (isolate)->event_logger()(name, 1)
#define LOG_EVENTS_AND_TAGS_LIST(V) \
V(CODE_CREATION_EVENT, "code-creation") \
@@ -320,11 +327,11 @@ class Logger {
public:
TimerEventScope(Isolate* isolate, const char* name)
: isolate_(isolate), name_(name) {
- if (FLAG_log_internal_timer_events) LogTimerEvent(START);
+ LogTimerEvent(START);
Yang 2014/03/05 08:18:31 I'm concerned that this may regress performance si
fmeawad 2014/03/06 00:24:46 As you mentioned, I am only including those for th
}
~TimerEventScope() {
- if (FLAG_log_internal_timer_events) LogTimerEvent(END);
+ LogTimerEvent(END);
}
void LogTimerEvent(StartEnd se);

Powered by Google App Engine
This is Rietveld 408576698