| Index: runtime/vm/compiler.cc
|
| diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
|
| index 493cc0e67e0152d076e0aa67fc2c6cffbba69723..85b09e58b9b3f219e26e0a1e975e53e72e6f068b 100644
|
| --- a/runtime/vm/compiler.cc
|
| +++ b/runtime/vm/compiler.cc
|
| @@ -414,6 +414,7 @@ static bool CompileParsedFunctionHelper(CompilationPipeline* pipeline,
|
| Thread* const thread = Thread::Current();
|
| Zone* const zone = thread->zone();
|
| Isolate* const isolate = thread->isolate();
|
| + TimelineStream* compiler_timeline = isolate->GetCompilerStream();
|
| CSTAT_TIMER_SCOPE(thread, codegen_timer);
|
| HANDLESCOPE(thread);
|
|
|
| @@ -475,6 +476,9 @@ static bool CompileParsedFunctionHelper(CompilationPipeline* pipeline,
|
| }
|
| }
|
|
|
| + TimelineDurationScope tds(thread,
|
| + compiler_timeline,
|
| + "BuildFlowGraph");
|
| flow_graph = pipeline->BuildFlowGraph(zone,
|
| parsed_function,
|
| *ic_data_array,
|
| @@ -498,6 +502,9 @@ static bool CompileParsedFunctionHelper(CompilationPipeline* pipeline,
|
| const bool reorder_blocks =
|
| FlowGraph::ShouldReorderBlocks(function, optimized);
|
| if (reorder_blocks) {
|
| + TimelineDurationScope tds(thread,
|
| + compiler_timeline,
|
| + "BlockScheduler::AssignEdgeWeights");
|
| block_scheduler.AssignEdgeWeights();
|
| }
|
|
|
| @@ -754,7 +761,12 @@ static bool CompileParsedFunctionHelper(CompilationPipeline* pipeline,
|
| // Perform register allocation on the SSA graph.
|
| FlowGraphAllocator allocator(*flow_graph);
|
| allocator.AllocateRegisters();
|
| - if (reorder_blocks) block_scheduler.ReorderBlocks();
|
| + if (reorder_blocks) {
|
| + TimelineDurationScope tds(thread,
|
| + compiler_timeline,
|
| + "BlockScheduler::ReorderBlocks");
|
| + block_scheduler.ReorderBlocks();
|
| + }
|
|
|
| if (print_flow_graph) {
|
| FlowGraphPrinter::PrintGraph("After Optimizations", flow_graph);
|
| @@ -769,10 +781,16 @@ static bool CompileParsedFunctionHelper(CompilationPipeline* pipeline,
|
| caller_inline_id);
|
| {
|
| CSTAT_TIMER_SCOPE(thread, graphcompiler_timer);
|
| + TimelineDurationScope tds(thread,
|
| + compiler_timeline,
|
| + "CompileGraph");
|
| graph_compiler.CompileGraph();
|
| pipeline->FinalizeCompilation();
|
| }
|
| {
|
| + TimelineDurationScope tds(thread,
|
| + compiler_timeline,
|
| + "FinalizeCompilation");
|
| // This part of compilation must be at a safepoint.
|
| if (!Thread::Current()->IsMutatorThread()) {
|
| // Stop mutator thread before creating the instruction object and
|
|
|