| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index fad4ecd09475da0fdf7fc0542fe1994c952d664f..447c1a3af5e9db22ca550cd72db54915dc866ccc 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -557,6 +557,8 @@
|
| &RuntimeCallStats::RecompileSynchronous);
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"),
|
| "V8.RecompileSynchronous");
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
|
| + isolate, &tracing::TraceEventStatsTable::RecompileSynchronous);
|
|
|
| if (job->PrepareJob() != CompilationJob::SUCCEEDED ||
|
| job->ExecuteJob() != CompilationJob::SUCCEEDED ||
|
| @@ -612,6 +614,8 @@
|
| &RuntimeCallStats::RecompileSynchronous);
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"),
|
| "V8.RecompileSynchronous");
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
|
| + isolate, &tracing::TraceEventStatsTable::RecompileSynchronous);
|
|
|
| if (job->PrepareJob() != CompilationJob::SUCCEEDED) return false;
|
| isolate->optimizing_compile_dispatcher()->QueueForOptimization(job);
|
| @@ -689,6 +693,8 @@
|
| TimerEventScope<TimerEventOptimizeCode> optimize_code_timer(isolate);
|
| RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::OptimizeCode);
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.OptimizeCode");
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
|
| + isolate, &tracing::TraceEventStatsTable::OptimizeCode);
|
|
|
| // TurboFan can optimize directly from existing bytecode.
|
| if (FLAG_turbo_from_bytecode && use_turbofan && ShouldUseIgnition(info)) {
|
| @@ -745,6 +751,8 @@
|
| &RuntimeCallStats::RecompileSynchronous);
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"),
|
| "V8.RecompileSynchronous");
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
|
| + isolate, &tracing::TraceEventStatsTable::RecompileSynchronous);
|
|
|
| Handle<SharedFunctionInfo> shared = info->shared_info();
|
| shared->code()->set_profiler_ticks(0);
|
| @@ -961,6 +969,8 @@
|
| RuntimeCallTimerScope runtimeTimer(isolate,
|
| &RuntimeCallStats::CompileCodeLazy);
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileCode");
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
|
| + isolate, &tracing::TraceEventStatsTable::CompileCodeLazy);
|
| AggregatedHistogramTimerScope timer(isolate->counters()->compile_lazy());
|
|
|
| if (FLAG_turbo_cache_shared_code) {
|
| @@ -1022,6 +1032,8 @@
|
| TimerEventScope<TimerEventCompileCode> timer(isolate);
|
| RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::CompileCode);
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileCode");
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
|
| + isolate, &tracing::TraceEventStatsTable::CompileCode);
|
| PostponeInterruptsScope postpone(isolate);
|
| DCHECK(!isolate->native_context().is_null());
|
| ParseInfo* parse_info = info->parse_info();
|
| @@ -1096,6 +1108,10 @@
|
| HistogramTimerScope timer(rate);
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"),
|
| parse_info->is_eval() ? "V8.CompileEval" : "V8.Compile");
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
|
| + isolate,
|
| + (parse_info->is_eval() ? &tracing::TraceEventStatsTable::CompileEval
|
| + : &tracing::TraceEventStatsTable::Compile));
|
|
|
| // Allocate a shared function info object.
|
| DCHECK_EQ(kNoSourcePosition, lit->function_token_position());
|
| @@ -1580,6 +1596,8 @@
|
| &RuntimeCallStats::CompileDeserialize);
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"),
|
| "V8.CompileDeserialize");
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
|
| + isolate, &tracing::TraceEventStatsTable::CompileDeserialize);
|
| Handle<SharedFunctionInfo> result;
|
| if (CodeSerializer::Deserialize(isolate, *cached_data, source)
|
| .ToHandle(&result)) {
|
| @@ -1654,6 +1672,8 @@
|
| &RuntimeCallStats::CompileSerialize);
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"),
|
| "V8.CompileSerialize");
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
|
| + isolate, &tracing::TraceEventStatsTable::CompileSerialize);
|
| *cached_data = CodeSerializer::Serialize(isolate, result, source);
|
| if (FLAG_profile_deserialization) {
|
| PrintF("[Compiling and serializing took %0.3f ms]\n",
|
| @@ -1772,6 +1792,8 @@
|
| TimerEventScope<TimerEventCompileCode> timer(isolate);
|
| RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::CompileCode);
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileCode");
|
| + TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
|
| + isolate, &tracing::TraceEventStatsTable::CompileCode);
|
|
|
| // Create a canonical handle scope if compiling ignition bytecode. This is
|
| // required by the constant array builder to de-duplicate common objects
|
|
|