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

Unified Diff: runtime/vm/compiler.cc

Issue 1447203002: Fix disassembly output for background compilation; modify some tests to run long enough for backgro… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/guard_field_test.cc » ('j') | no next file with comments »
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 8ba747c317711a11fc3d1504068198630933b2ba..f3d879a8c90bf2a28d645b2b1974441517858ac5 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -1142,7 +1142,9 @@ static RawError* CompileFunctionHelper(CompilationPipeline* pipeline,
DisassembleCode(function, optimized);
} else if (FLAG_disassemble_optimized &&
optimized &&
- FlowGraphPrinter::ShouldPrint(function)) {
+ FlowGraphPrinter::ShouldPrint(function) &&
+ (result == NULL) /* no background compilation*/ ) {
+ // With background compilation, print when installing the code.
// TODO(fschneider): Print unoptimized code along with the optimized code.
THR_Print("*** BEGIN CODE\n");
DisassembleCode(function, true);
@@ -1867,6 +1869,10 @@ void BackgroundCompiler::InstallGeneratedCode() {
}
if (result.IsValid()) {
function.InstallOptimizedCode(result.result_code(), false /* not OSR */);
+ if (FLAG_trace_compiler) {
+ THR_Print("Installing optimized code for %s\n",
+ function.ToQualifiedCString());
+ }
// Install leaf classes and fields dependencies.
Class& cls = Class::Handle();
for (intptr_t i = 0; i < result.leaf_classes().Length(); i++) {
@@ -1885,6 +1891,13 @@ void BackgroundCompiler::InstallGeneratedCode() {
// Reset to 0 so that it can be recompiled if needed.
function.set_usage_counter(0);
}
+ if (result.IsValid() &&
+ FLAG_disassemble_optimized &&
+ FlowGraphPrinter::ShouldPrint(function)) {
+ THR_Print("*** BEGIN CODE\n");
+ DisassembleCode(function, true);
+ THR_Print("*** END CODE\n");
+ }
}
}
« no previous file with comments | « no previous file | runtime/vm/guard_field_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698