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

Unified Diff: runtime/vm/compiler.cc

Issue 10116012: Add more timing information. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 months 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/compiler_stats.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 6695)
+++ runtime/vm/compiler.cc (working copy)
@@ -164,7 +164,6 @@
FlowGraphBuilder graph_builder(parsed_function);
graph_builder.BuildGraph();
- Assembler assembler;
// The non-optimizing compiler compiles blocks in reverse postorder,
// because it is a 'natural' order for the human reader of the
// generated code.
@@ -173,13 +172,19 @@
for (intptr_t i = length - 1; i >= 0; --i) {
block_order.Add(graph_builder.postorder_block_entries()[i]);
}
+
+ Assembler assembler;
FlowGraphCompiler graph_compiler(&assembler, parsed_function,
block_order);
graph_compiler.CompileGraph();
+
+ TimerScope timer(FLAG_compiler_stats,
+ &CompilerStats::codefinalizer_timer);
const Code& code =
Code::Handle(Code::FinalizeCode(function_fullname, &assembler));
code.set_is_optimized(false);
graph_compiler.FinalizePcDescriptors(code);
+ graph_compiler.FinalizeStackmaps(code);
graph_compiler.FinalizeVarDescriptors(code);
graph_compiler.FinalizeExceptionHandlers(code);
function.set_unoptimized_code(code);
@@ -215,6 +220,8 @@
}
OptimizingCodeGenerator code_gen(&assembler, parsed_function);
code_gen.GenerateCode();
+ TimerScope timer(FLAG_compiler_stats,
+ &CompilerStats::codefinalizer_timer);
Code& code = Code::Handle(
Code::FinalizeCode(function_fullname, &assembler));
code.set_is_optimized(true);
@@ -233,6 +240,8 @@
// Compiling first time.
CodeGenerator code_gen(&assembler, parsed_function);
code_gen.GenerateCode();
+ TimerScope timer(FLAG_compiler_stats,
+ &CompilerStats::codefinalizer_timer);
const Code& code =
Code::Handle(Code::FinalizeCode(function_fullname, &assembler));
code.set_is_optimized(false);
« no previous file with comments | « no previous file | runtime/vm/compiler_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698