Index: src/log.cc |
diff --git a/src/log.cc b/src/log.cc |
index 3eede365b768ec51e42b1b5cf5180d3ea753265a..92cde1a8788fba0a8574b99ab065f5fc66806556 100644 |
--- a/src/log.cc |
+++ b/src/log.cc |
@@ -23,6 +23,7 @@ |
#include "src/runtime-profiler.h" |
#include "src/serialize.h" |
#include "src/string-stream.h" |
+#include "src/tracing/trace-event.h" |
#include "src/vm-state-inl.h" |
namespace v8 { |
@@ -942,6 +943,8 @@ void Logger::TimerEvent(Logger::StartEnd se, const char* name) { |
void Logger::EnterExternal(Isolate* isolate) { |
+ TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("V8::External"), |
+ TimerEventExternal::name()); |
LOG(isolate, TimerEvent(START, TimerEventExternal::name())); |
DCHECK(isolate->current_vm_state() == JS); |
isolate->set_current_vm_state(EXTERNAL); |
@@ -949,6 +952,8 @@ void Logger::EnterExternal(Isolate* isolate) { |
void Logger::LeaveExternal(Isolate* isolate) { |
+ TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("V8::External"), |
+ TimerEventExternal::name()); |
LOG(isolate, TimerEvent(END, TimerEventExternal::name())); |
DCHECK(isolate->current_vm_state() == EXTERNAL); |
isolate->set_current_vm_state(JS); |
@@ -958,12 +963,12 @@ void Logger::LeaveExternal(Isolate* isolate) { |
template <class TimerEvent> |
void TimerEventScope<TimerEvent>::LogTimerEvent(Logger::StartEnd se) { |
Logger::CallEventLogger(isolate_, TimerEvent::name(), se, |
- TimerEvent::expose_to_api()); |
+ TimerEvent::overhead()); |
} |
// Instantiate template methods. |
-#define V(TimerName, expose) \ |
+#define V(TimerName, overhead) \ |
template void TimerEventScope<TimerEvent##TimerName>::LogTimerEvent( \ |
Logger::StartEnd se); |
TIMER_EVENTS_LIST(V) |