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); |