Index: runtime/vm/compiler.cc |
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc |
index 006e812848561ca60ed1793069cc6c237acbb1db..958d4c113718172f7101cf97a5e16c8d73ec5f7b 100644 |
--- a/runtime/vm/compiler.cc |
+++ b/runtime/vm/compiler.cc |
@@ -59,6 +59,7 @@ DEFINE_FLAG(bool, print_flow_graph_optimized, false, |
"Print the IR flow graph when optimizing."); |
DEFINE_FLAG(bool, print_ic_data_map, false, |
"Print the deopt-id to ICData map in optimizing compiler."); |
+DEFINE_FLAG(bool, print_code_source_map, false, "Print code source map."); |
DEFINE_FLAG(bool, range_analysis, true, "Enable range analysis"); |
DEFINE_FLAG(bool, reorder_basic_blocks, true, "Enable basic-block reordering."); |
DEFINE_FLAG(bool, trace_compiler, false, "Trace compiler operations."); |
@@ -468,6 +469,16 @@ void CompileParsedFunctionHelper::FinalizeCompilation( |
graph_compiler->FinalizeExceptionHandlers(code); |
graph_compiler->FinalizeStaticCallTargetsTable(code); |
+ // Set the code source map after setting the inlined information because |
rmacnak
2016/02/25 23:04:40
NOT_IN_PRODUCT
Cutch
2016/02/26 15:59:21
Done.
|
+ // we use the inlined information when printing. |
+ const CodeSourceMap& code_source_map = |
+ CodeSourceMap::Handle( |
+ zone, |
+ graph_compiler->code_source_map_builder()->Finalize()); |
+ code.set_code_source_map(code_source_map); |
+ if (FLAG_print_code_source_map) { |
+ CodeSourceMap::Dump(code_source_map, code, function); |
+ } |
if (optimized()) { |
// Installs code while at safepoint. |
if (thread()->IsMutatorThread()) { |