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

Unified Diff: runtime/vm/compiler.cc

Issue 1879033002: Print messages when aborting background compilation (--trace-compiler); turn on background compilat… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add timeline info Created 4 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 | « runtime/vm/compiler.h ('k') | runtime/vm/flag_list.h » ('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 3b77dd20bbfd761210aa29beb8d66eb9e844c835..bf9aff779924fb9b93059f7fb5951fbd47d2c2d0 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -657,7 +657,8 @@ bool CompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) {
if (Compiler::IsBackgroundCompilation() &&
(function.ic_data_array() == Array::null())) {
- Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId);
+ Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
+ "RestoreICDataMap: ICData array cleared.");
}
if (FLAG_print_ic_data_map) {
for (intptr_t i = 0; i < ic_data_array->length(); i++) {
@@ -1067,7 +1068,8 @@ bool CompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) {
NoHeapGrowthControlScope no_growth_control;
if (!isolate()->background_compiler()->is_running()) {
// The background compiler is being stopped.
- Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId);
+ Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
+ "Background compilation is being stopped");
}
FinalizeCompilation(&assembler, &graph_compiler, flow_graph);
}
@@ -1195,7 +1197,8 @@ static RawError* CompileFunctionHelper(CompilationPipeline* pipeline,
isolate->loading_invalidation_gen())) {
// Loading occured while parsing. We need to abort here because state
// changed while compiling.
- Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId);
+ Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
+ "Invalidated state during parsing because of script loading");
}
}
@@ -1579,9 +1582,18 @@ RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
}
-void Compiler::AbortBackgroundCompilation(intptr_t deopt_id) {
+void Compiler::AbortBackgroundCompilation(intptr_t deopt_id, const char* msg) {
if (FLAG_trace_compiler) {
- THR_Print("ABORT background compilation\n");
+ THR_Print("ABORT background compilation: %s\n", msg);
+ }
+ TimelineStream* stream = Timeline::GetCompilerStream();
+ ASSERT(stream != NULL);
+ TimelineEvent* event = stream->StartEvent();
+ if (event != NULL) {
+ event->Instant("AbortBackgroundCompilation");
+ event->SetNumArguments(1);
+ event->CopyArgument(0, "reason", msg);
+ event->Complete();
}
ASSERT(Compiler::IsBackgroundCompilation());
Thread::Current()->long_jump_base()->Jump(
@@ -1967,7 +1979,7 @@ RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
}
-void Compiler::AbortBackgroundCompilation(intptr_t deopt_id) {
+void Compiler::AbortBackgroundCompilation(intptr_t deopt_id, const char* msg) {
UNREACHABLE();
}
« no previous file with comments | « runtime/vm/compiler.h ('k') | runtime/vm/flag_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698