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

Unified Diff: runtime/vm/compiler.cc

Issue 1847683002: Fix CompilerStats aggregation: do not aggregate if there is no mutator thread (isolate shutting dow… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: d Created 4 years, 9 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/profiler_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 92c3d68f3c69c4292e80586d03c19b1117ca946a..cd6208852615f9181c49291e4170cd94a473c42b 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -1688,7 +1688,10 @@ void BackgroundCompiler::Run() {
// unoptimized code. Any issues while optimizing are flagged by
// making the result invalid.
ASSERT(error.IsNull());
- isolate->aggregate_compiler_stats()->Add(*thread->compiler_stats());
+ // We cannot aggregate stats if isolate is shutting down.
+ if (isolate->HasMutatorThread()) {
+ isolate->aggregate_compiler_stats()->Add(*thread->compiler_stats());
+ }
thread->compiler_stats()->Clear();
QueueElement* qelem = function_queue()->Remove();
delete qelem;
« no previous file with comments | « no previous file | runtime/vm/profiler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698