Index: src/log-inl.h |
diff --git a/src/log-inl.h b/src/log-inl.h |
index 70c74bc33f57f9a0e1c24078a7e3ba7292557b25..d47a24b96afae22190671099663fecb3607bae08 100644 |
--- a/src/log-inl.h |
+++ b/src/log-inl.h |
@@ -8,6 +8,7 @@ |
#include "src/log.h" |
#include "src/isolate.h" |
#include "src/objects-inl.h" |
+#include "src/tracing/trace-event.h" |
namespace v8 { |
namespace internal { |
@@ -37,6 +38,19 @@ void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se, |
isolate->event_logger()(name, se); |
} |
} |
+ if (expose_to_api) { |
+ if (se == START) { |
+ TRACE_EVENT_BEGIN0("v8", name); |
+ } else { |
+ TRACE_EVENT_END0("v8", name); |
+ } |
+ } else { |
+ if (se == START) { |
+ TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("v8"), name); |
+ } else { |
+ TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("v8"), name); |
+ } |
+ } |
} |
} // namespace internal |
} // namespace v8 |