| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index a29d294fafd6ca7fbbd5b6d57b6ea5ba5b7f8e50..1a0c736469b950ac09af3f3df17a627b00afe5e3 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -75,6 +75,9 @@ namespace v8 {
|
| #define LOG_API(isolate, class_name, function_name) \
|
| i::RuntimeCallTimerScope _runtime_timer( \
|
| isolate, &i::RuntimeCallStats::API_##class_name##_##function_name); \
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( \
|
| + isolate, &internal::tracing::TraceEventStatsTable:: \
|
| + API_##class_name##_##function_name); \
|
| LOG(isolate, ApiEntryCall("v8::" #class_name "::" #function_name))
|
|
|
| #define ENTER_V8(isolate) i::VMState<v8::OTHER> __state__((isolate))
|
| @@ -1830,7 +1833,7 @@ MaybeLocal<Value> Script::Run(Local<Context> context) {
|
| i::HistogramTimerScope execute_timer(isolate->counters()->execute(), true);
|
| i::AggregatingHistogramTimerScope timer(isolate->counters()->compile_lazy());
|
| i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate);
|
| - TRACE_EVENT0("v8", "V8.Execute");
|
| + TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute");
|
| auto fun = i::Handle<i::JSFunction>::cast(Utils::OpenHandle(this));
|
| i::Handle<i::Object> receiver = isolate->global_proxy();
|
| Local<Value> result;
|
| @@ -1865,7 +1868,7 @@ MaybeLocal<UnboundScript> ScriptCompiler::CompileUnboundInternal(
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
|
| PREPARE_FOR_EXECUTION_WITH_ISOLATE(isolate, ScriptCompiler, CompileUnbound,
|
| UnboundScript);
|
| - TRACE_EVENT0("v8", "V8.ScriptCompiler");
|
| + TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.ScriptCompiler");
|
|
|
| // Don't try to produce any kind of cache when the debugger is loaded.
|
| if (isolate->debug()->is_loaded() &&
|
| @@ -4407,7 +4410,7 @@ MaybeLocal<Value> Object::CallAsFunction(Local<Context> context,
|
| Local<Value> argv[]) {
|
| PREPARE_FOR_EXECUTION_WITH_CALLBACK(context, Object, CallAsFunction, Value);
|
| i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate);
|
| - TRACE_EVENT0("v8", "V8.Execute");
|
| + TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute");
|
| auto self = Utils::OpenHandle(this);
|
| auto recv_obj = Utils::OpenHandle(*recv);
|
| STATIC_ASSERT(sizeof(v8::Local<v8::Value>) == sizeof(i::Object**));
|
| @@ -4434,7 +4437,7 @@ MaybeLocal<Value> Object::CallAsConstructor(Local<Context> context, int argc,
|
| PREPARE_FOR_EXECUTION_WITH_CALLBACK(context, Object, CallAsConstructor,
|
| Value);
|
| i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate);
|
| - TRACE_EVENT0("v8", "V8.Execute");
|
| + TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute");
|
| auto self = Utils::OpenHandle(this);
|
| STATIC_ASSERT(sizeof(v8::Local<v8::Value>) == sizeof(i::Object**));
|
| i::Handle<i::Object>* args = reinterpret_cast<i::Handle<i::Object>*>(argv);
|
| @@ -4484,7 +4487,7 @@ MaybeLocal<Object> Function::NewInstance(Local<Context> context, int argc,
|
| v8::Local<v8::Value> argv[]) const {
|
| PREPARE_FOR_EXECUTION_WITH_CALLBACK(context, Function, NewInstance, Object);
|
| i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate);
|
| - TRACE_EVENT0("v8", "V8.Execute");
|
| + TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute");
|
| auto self = Utils::OpenHandle(this);
|
| STATIC_ASSERT(sizeof(v8::Local<v8::Value>) == sizeof(i::Object**));
|
| i::Handle<i::Object>* args = reinterpret_cast<i::Handle<i::Object>*>(argv);
|
| @@ -4508,7 +4511,7 @@ MaybeLocal<v8::Value> Function::Call(Local<Context> context,
|
| v8::Local<v8::Value> argv[]) {
|
| PREPARE_FOR_EXECUTION_WITH_CALLBACK(context, Function, Call, Value);
|
| i::TimerEventScope<i::TimerEventExecute> timer_scope(isolate);
|
| - TRACE_EVENT0("v8", "V8.Execute");
|
| + TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.Execute");
|
| auto self = Utils::OpenHandle(this);
|
| i::Handle<i::Object> recv_obj = Utils::OpenHandle(*recv);
|
| STATIC_ASSERT(sizeof(v8::Local<v8::Value>) == sizeof(i::Object**));
|
| @@ -5706,6 +5709,7 @@ Local<Context> NewContext(v8::Isolate* external_isolate,
|
| size_t context_snapshot_index) {
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(external_isolate);
|
| LOG_API(isolate, Context, New);
|
| + TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.NewContext");
|
| i::HandleScope scope(isolate);
|
| ExtensionConfiguration no_extensions;
|
| if (extensions == NULL) extensions = &no_extensions;
|
| @@ -8968,6 +8972,9 @@ void InvokeAccessorGetterCallback(
|
| Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
|
| RuntimeCallTimerScope timer(isolate,
|
| &RuntimeCallStats::AccessorGetterCallback);
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
|
| + isolate,
|
| + &internal::tracing::TraceEventStatsTable::AccessorGetterCallback);
|
| Address getter_address = reinterpret_cast<Address>(reinterpret_cast<intptr_t>(
|
| getter));
|
| VMState<EXTERNAL> state(isolate);
|
| @@ -8981,6 +8988,9 @@ void InvokeFunctionCallback(const v8::FunctionCallbackInfo<v8::Value>& info,
|
| Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
|
| RuntimeCallTimerScope timer(isolate,
|
| &RuntimeCallStats::InvokeFunctionCallback);
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
|
| + isolate,
|
| + &internal::tracing::TraceEventStatsTable::InvokeFunctionCallback);
|
| Address callback_address =
|
| reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
|
| VMState<EXTERNAL> state(isolate);
|
|
|