Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 9e7592ee765f4daf56db7140009b1728644d01ec..2583c32d39363036f85f9fb5b158f0068c4c549b 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -736,6 +736,8 @@ bool GetOptimizedCodeNow(CompilationJob* job) { |
TimerEventScope<TimerEventRecompileSynchronous> timer(isolate); |
RuntimeCallTimerScope runtimeTimer(isolate, |
&RuntimeCallStats::RecompileSynchronous); |
+ TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), |
+ "V8.RecompileSynchronous"); |
TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
isolate, &tracing::TraceEventStatsTable::RecompileSynchronous); |
@@ -791,6 +793,8 @@ bool GetOptimizedCodeLater(CompilationJob* job) { |
TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); |
RuntimeCallTimerScope runtimeTimer(info->isolate(), |
&RuntimeCallStats::RecompileSynchronous); |
+ TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), |
+ "V8.RecompileSynchronous"); |
TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
isolate, &tracing::TraceEventStatsTable::RecompileSynchronous); |
@@ -869,6 +873,7 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function, |
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); |
@@ -925,6 +930,8 @@ CompilationJob::Status FinalizeOptimizedCompilationJob(CompilationJob* job) { |
TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); |
RuntimeCallTimerScope runtimeTimer(isolate, |
&RuntimeCallStats::RecompileSynchronous); |
+ TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), |
+ "V8.RecompileSynchronous"); |
TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
isolate, &tracing::TraceEventStatsTable::RecompileSynchronous); |
@@ -1142,6 +1149,7 @@ MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) { |
TimerEventScope<TimerEventCompileCode> compile_timer(isolate); |
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()); |
@@ -1204,6 +1212,7 @@ Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) { |
Isolate* isolate = info->isolate(); |
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); |
@@ -1278,6 +1287,8 @@ Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) { |
? info->isolate()->counters()->compile_eval() |
: info->isolate()->counters()->compile(); |
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 |
@@ -1764,6 +1775,8 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript( |
HistogramTimerScope timer(isolate->counters()->compile_deserialize()); |
RuntimeCallTimerScope runtimeTimer(isolate, |
&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; |
@@ -1838,6 +1851,8 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript( |
isolate->counters()->compile_serialize()); |
RuntimeCallTimerScope runtimeTimer(isolate, |
&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); |
@@ -1957,6 +1972,7 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfo( |
// Generate code |
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); |