Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: runtime/vm/compiler.cc

Issue 1523833003: Add more compiler timeline durations (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | runtime/vm/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698